objetto
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: objetto | ||
| Version: 1.25.3 | ||
| Version: 1.26.0 | ||
| Summary: Object-oriented framework for building smart applications and APIs | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/brunonicko/objetto |
@@ -648,2 +648,3 @@ # -*- coding: utf-8 -*- | ||
| # Both are constant attributes with a non-empty tuple/frozenset. | ||
| is_multi_constant = False | ||
| if ( | ||
@@ -657,2 +658,3 @@ abstract_attribute.constant | ||
| ): | ||
| is_multi_constant = True | ||
| abstract_member_types = tuple( | ||
@@ -699,2 +701,36 @@ type(v) for v in abstract_attribute.default | ||
| # Types are meta and attributes are constant, use the values. | ||
| if abstract_attribute.constant and member.constant: | ||
| if ( | ||
| abstract_member_types | ||
| and member_types | ||
| and all( | ||
| issubclass(t, type) for t in abstract_member_types | ||
| ) | ||
| and all(issubclass(t, type) for t in member_types) | ||
| and ( | ||
| all( | ||
| isinstance(v, type) | ||
| for v in abstract_attribute.default | ||
| ) | ||
| if is_multi_constant | ||
| else isinstance(abstract_attribute.default, type) | ||
| ) | ||
| and ( | ||
| all(isinstance(v, type) for v in member.default) | ||
| if is_multi_constant | ||
| else isinstance(member.default, type) | ||
| ) | ||
| ): | ||
| if is_multi_constant: | ||
| abstract_member_types = tuple( | ||
| abstract_attribute.default | ||
| ) | ||
| member_types = tuple(member.default) | ||
| else: | ||
| abstract_member_types = ( | ||
| abstract_attribute.default, | ||
| ) | ||
| member_types = (member.default,) | ||
| # Types need to be compatible. | ||
@@ -711,2 +747,6 @@ # Implementation needs to be a subset and subclass of abstract. | ||
| # Ignore lazy type. | ||
| if isinstance(typ, BASE_STRING_TYPES): | ||
| continue | ||
| # Match! | ||
@@ -713,0 +753,0 @@ if issubclass(t, typ): |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: objetto | ||
| Version: 1.25.3 | ||
| Version: 1.26.0 | ||
| Summary: Object-oriented framework for building smart applications and APIs | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/brunonicko/objetto |
+1
-1
@@ -8,3 +8,3 @@ import setuptools | ||
| name="objetto", | ||
| version="1.25.3", | ||
| version="1.26.0", | ||
| author="Bruno Nicko", | ||
@@ -11,0 +11,0 @@ author_email="brunonicko@gmail.com", |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
1029010
0.21%25493
0.15%