enumerific 1.0.4__py3-none-any.whl → 1.0.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- enumerific/extensible.py +8 -4
- enumerific/version.txt +1 -1
- {enumerific-1.0.4.dist-info → enumerific-1.0.5.dist-info}/METADATA +1 -1
- enumerific-1.0.5.dist-info/RECORD +12 -0
- enumerific-1.0.4.dist-info/RECORD +0 -12
- {enumerific-1.0.4.dist-info → enumerific-1.0.5.dist-info}/WHEEL +0 -0
- {enumerific-1.0.4.dist-info → enumerific-1.0.5.dist-info}/licenses/LICENSE.md +0 -0
- {enumerific-1.0.4.dist-info → enumerific-1.0.5.dist-info}/top_level.txt +0 -0
- {enumerific-1.0.4.dist-info → enumerific-1.0.5.dist-info}/zip-safe +0 -0
enumerific/extensible.py
CHANGED
|
@@ -1195,7 +1195,7 @@ class EnumerationMetaClass(type):
|
|
|
1195
1195
|
|
|
1196
1196
|
logger.debug("+" * 100)
|
|
1197
1197
|
|
|
1198
|
-
def __getattr__(self, name) -> object:
|
|
1198
|
+
def __getattr__(self, name: str) -> object:
|
|
1199
1199
|
# logger.debug("%s.__getattr__(name: %s)", self.__class__.__name__, name)
|
|
1200
1200
|
|
|
1201
1201
|
if name.startswith("_") or name in self._special:
|
|
@@ -1651,7 +1651,7 @@ class Enumeration(metaclass=EnumerationMetaClass):
|
|
|
1651
1651
|
)
|
|
1652
1652
|
|
|
1653
1653
|
if annotations is None:
|
|
1654
|
-
|
|
1654
|
+
self._annotations = anno(value=self.value)
|
|
1655
1655
|
elif isinstance(annotations, anno):
|
|
1656
1656
|
self._annotations = annotations
|
|
1657
1657
|
else:
|
|
@@ -1704,8 +1704,6 @@ class Enumeration(metaclass=EnumerationMetaClass):
|
|
|
1704
1704
|
return object.__getattribute__(self, name)
|
|
1705
1705
|
elif self._enumerations and name in self._enumerations:
|
|
1706
1706
|
return self._enumerations[name]
|
|
1707
|
-
elif self._annotations and name in self._annotations:
|
|
1708
|
-
return self._annotations[name]
|
|
1709
1707
|
elif self._context and name in dir(self._context):
|
|
1710
1708
|
# Handle class methods, instance methods and properties here; because we are
|
|
1711
1709
|
# performing some special handling for enumerations, we need to reintroduce
|
|
@@ -1719,6 +1717,8 @@ class Enumeration(metaclass=EnumerationMetaClass):
|
|
|
1719
1717
|
return attribute.__get__(self)
|
|
1720
1718
|
else:
|
|
1721
1719
|
return attribute
|
|
1720
|
+
elif self._annotations and name in self._annotations:
|
|
1721
|
+
return self._annotations[name]
|
|
1722
1722
|
else:
|
|
1723
1723
|
# EnumerationOptionError subclasses AttributeError so we adhere to convention
|
|
1724
1724
|
raise EnumerationOptionError(
|
|
@@ -1753,6 +1753,10 @@ class Enumeration(metaclass=EnumerationMetaClass):
|
|
|
1753
1753
|
def value(self) -> object:
|
|
1754
1754
|
return self._value
|
|
1755
1755
|
|
|
1756
|
+
@property
|
|
1757
|
+
def annotations(self) -> anno:
|
|
1758
|
+
return self._annotations
|
|
1759
|
+
|
|
1756
1760
|
@property
|
|
1757
1761
|
def aliased(self) -> bool:
|
|
1758
1762
|
logger.debug(
|
enumerific/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.5
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
enumerific/__init__.py,sha256=K9iFirgxSkrHgXfhocOvgRkskGe0VfWRgxEvppnVWBM,587
|
|
2
|
+
enumerific/exceptions.py,sha256=lvfcH1cz43hDjzSUpgm1-OZjKzxo--fyZ8UsBS-GiZA,359
|
|
3
|
+
enumerific/extensible.py,sha256=W-W1wXCW1wE7PP3Y2qbhxLpD2ETjmIQ-QTGnWIEGUyg,85084
|
|
4
|
+
enumerific/logging.py,sha256=zz1Phnot1BFWMoxwvZ0FlZDsiYZZYhz-_S4IzgPYc40,97
|
|
5
|
+
enumerific/standard.py,sha256=xQhhwlcYZ6-8DmgscbV38g2Ol5Z8_vvBwonz-Ww0I40,3254
|
|
6
|
+
enumerific/version.txt,sha256=nXE_EpedYoeSULwKIDXj71cxWsQlHoUBnSHHXtcmlyA,5
|
|
7
|
+
enumerific-1.0.5.dist-info/licenses/LICENSE.md,sha256=j1XidOCGUhPx7CyXA31uC0XGKDRnvUcZpMp161qHI6g,1077
|
|
8
|
+
enumerific-1.0.5.dist-info/METADATA,sha256=WDWq40qr1A3IHSTMDVOfUcCw76YCUnlEqxcRKPI4rRU,32990
|
|
9
|
+
enumerific-1.0.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
enumerific-1.0.5.dist-info/top_level.txt,sha256=hyemsMgPYZgSx71XHmFRF-gvc_2Y4rDAESR8e0hbYHU,11
|
|
11
|
+
enumerific-1.0.5.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
12
|
+
enumerific-1.0.5.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
enumerific/__init__.py,sha256=K9iFirgxSkrHgXfhocOvgRkskGe0VfWRgxEvppnVWBM,587
|
|
2
|
-
enumerific/exceptions.py,sha256=lvfcH1cz43hDjzSUpgm1-OZjKzxo--fyZ8UsBS-GiZA,359
|
|
3
|
-
enumerific/extensible.py,sha256=nf82wPMWSzfpjF-LB5-UxreDji01cztG8rLWJe50SXE,84958
|
|
4
|
-
enumerific/logging.py,sha256=zz1Phnot1BFWMoxwvZ0FlZDsiYZZYhz-_S4IzgPYc40,97
|
|
5
|
-
enumerific/standard.py,sha256=xQhhwlcYZ6-8DmgscbV38g2Ol5Z8_vvBwonz-Ww0I40,3254
|
|
6
|
-
enumerific/version.txt,sha256=rqWtvvV0eFJzxPOcG3aHz4AZk-DLa_Z4GkFonk7bsgw,5
|
|
7
|
-
enumerific-1.0.4.dist-info/licenses/LICENSE.md,sha256=j1XidOCGUhPx7CyXA31uC0XGKDRnvUcZpMp161qHI6g,1077
|
|
8
|
-
enumerific-1.0.4.dist-info/METADATA,sha256=WjQvIzsJYm4D75GhiF703QwI39Ph6TP55DfcNY18xP8,32990
|
|
9
|
-
enumerific-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
-
enumerific-1.0.4.dist-info/top_level.txt,sha256=hyemsMgPYZgSx71XHmFRF-gvc_2Y4rDAESR8e0hbYHU,11
|
|
11
|
-
enumerific-1.0.4.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
12
|
-
enumerific-1.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|