typedparser 0.10.7__tar.gz → 0.10.8__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.10.7 → typedparser-0.10.8}/PKG-INFO +2 -2
- {typedparser-0.10.7 → typedparser-0.10.8}/README.md +1 -1
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser/__init__.py +1 -1
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser/_typedattr.py +6 -2
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser.egg-info/PKG-INFO +2 -2
- {typedparser-0.10.7 → typedparser-0.10.8}/LICENSE +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/pyproject.toml +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/requirements.txt +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/setup.cfg +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser/_typedparser.py +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser/custom_format.py +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser/funcs.py +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser/objects.py +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser.egg-info/SOURCES.txt +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser.egg-info/dependency_links.txt +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser.egg-info/requires.txt +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser.egg-info/top_level.txt +0 -0
- {typedparser-0.10.7 → typedparser-0.10.8}/src/typedparser.egg-info/zip-safe +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: typedparser
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.8
|
|
4
4
|
Summary: Extension for python argparse with typehints and typechecks.
|
|
5
5
|
Author: simon-ging
|
|
6
6
|
License: Apache-2.0
|
|
@@ -181,7 +181,7 @@ Note: Some tests are skipped for python 3.7.
|
|
|
181
181
|
|
|
182
182
|
~~~bash
|
|
183
183
|
pip install -e .
|
|
184
|
-
pip install pytest pytest-cov pylint
|
|
184
|
+
pip install pytest pytest-cov pylint
|
|
185
185
|
pylint typedparser
|
|
186
186
|
|
|
187
187
|
# run tests
|
|
@@ -22,7 +22,11 @@ from typing import (
|
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
from .objects import check_object_equality, RecursorInterface, StrictRecursor, AttrsClass
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
try:
|
|
27
|
+
from types import UnionType
|
|
28
|
+
except ImportError:
|
|
29
|
+
UnionType = None
|
|
26
30
|
|
|
27
31
|
try:
|
|
28
32
|
# python>=3.8
|
|
@@ -314,7 +318,7 @@ def _parse_nested(
|
|
|
314
318
|
return value
|
|
315
319
|
|
|
316
320
|
# resolve unions (mostly "optional")
|
|
317
|
-
if origin == Union or isinstance(typ, UnionType):
|
|
321
|
+
if origin == Union or (UnionType is not None and isinstance(typ, UnionType)):
|
|
318
322
|
for new_typ in args:
|
|
319
323
|
try:
|
|
320
324
|
# force strict parsing and catch errors to try all different types
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: typedparser
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.8
|
|
4
4
|
Summary: Extension for python argparse with typehints and typechecks.
|
|
5
5
|
Author: simon-ging
|
|
6
6
|
License: Apache-2.0
|
|
@@ -181,7 +181,7 @@ Note: Some tests are skipped for python 3.7.
|
|
|
181
181
|
|
|
182
182
|
~~~bash
|
|
183
183
|
pip install -e .
|
|
184
|
-
pip install pytest pytest-cov pylint
|
|
184
|
+
pip install pytest pytest-cov pylint
|
|
185
185
|
pylint typedparser
|
|
186
186
|
|
|
187
187
|
# run tests
|
|
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
|