-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path_variant.py
More file actions
37 lines (30 loc) · 1.04 KB
/
_variant.py
File metadata and controls
37 lines (30 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# ------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -------------------------------------------------------------------------
"""Variant model representing a feature flag variant."""
from typing import Any
class Variant:
"""
A class representing a variant configuration assigned by a feature flag.
:param str name: The name of the variant
:param dict configuration: The configuration of the variant.
"""
def __init__(self, name: str, configuration: Any) -> None:
self._name = name
self._configuration = configuration
@property
def name(self) -> str:
"""
The name of the variant.
:rtype: str
"""
return self._name
@property
def configuration(self) -> Any:
"""
The configuration of the variant.
:rtype: Any
"""
return self._configuration