typedparser 0.22.4__tar.gz → 0.22.7__tar.gz
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.
- {typedparser-0.22.4 → typedparser-0.22.7}/PKG-INFO +2 -2
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser/__init__.py +1 -1
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser/objects.py +23 -6
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser.egg-info/PKG-INFO +2 -2
- {typedparser-0.22.4 → typedparser-0.22.7}/LICENSE +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/README.md +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/pyproject.toml +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/requirements.txt +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/setup.cfg +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser/_typedattr.py +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser/_typedparser.py +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser/custom_format.py +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser/funcs.py +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser.egg-info/SOURCES.txt +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser.egg-info/dependency_links.txt +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser.egg-info/requires.txt +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser.egg-info/top_level.txt +0 -0
- {typedparser-0.22.4 → typedparser-0.22.7}/src/typedparser.egg-info/zip-safe +0 -0
|
@@ -26,10 +26,26 @@ def get_attr_names(cls: AttrsClass) -> List[str]:
|
|
|
26
26
|
return [att.name for att in fields(cls)] # noqa
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
def
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
# def _get_all_base_classes_rec(klass: type) -> Generator[type, None, None]:
|
|
30
|
+
# for base in klass.__bases__:
|
|
31
|
+
# yield base
|
|
32
|
+
# yield from _get_all_base_classes_rec(base)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def get_all_base_classes(input_class: type) -> List[type]:
|
|
36
|
+
classes = {}
|
|
37
|
+
|
|
38
|
+
def _get_all_base_classes_rec(class_here: type):
|
|
39
|
+
for base in class_here.__bases__:
|
|
40
|
+
if base == object:
|
|
41
|
+
continue
|
|
42
|
+
if base in classes:
|
|
43
|
+
continue
|
|
44
|
+
classes[base] = base
|
|
45
|
+
_get_all_base_classes_rec(base)
|
|
46
|
+
|
|
47
|
+
_get_all_base_classes_rec(input_class)
|
|
48
|
+
return list(classes.values())
|
|
33
49
|
|
|
34
50
|
|
|
35
51
|
def is_standard_mapping(d: Any) -> bool:
|
|
@@ -274,9 +290,10 @@ def compare_nested_objects(
|
|
|
274
290
|
def _compare_leaf(
|
|
275
291
|
d1: Any, d2: Any, _depth: int, rtol=1.0e-5, atol=1.0e-8, equal_nan=False, prefix=""
|
|
276
292
|
) -> List[str]:
|
|
293
|
+
|
|
277
294
|
# at this point the 2 leaves are guaranteed to be the same type
|
|
278
|
-
if np is not None and isinstance(d1, np.ndarray):
|
|
279
|
-
comp = np.allclose(d1, d2, rtol=rtol, atol=atol, equal_nan=equal_nan)
|
|
295
|
+
if np is not None and isinstance(d1, np.ndarray): # noqa
|
|
296
|
+
comp = np.allclose(d1, d2, rtol=rtol, atol=atol, equal_nan=equal_nan) # noqa
|
|
280
297
|
else:
|
|
281
298
|
comp = d1 == d2
|
|
282
299
|
if not comp:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|