typedparser 0.12.5__tar.gz → 0.13.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: typedparser
3
- Version: 0.12.5
3
+ Version: 0.13.2
4
4
  Summary: Extension for python argparse with typehints and typechecks.
5
5
  Author: simon-ging
6
6
  License: Apache-2.0
@@ -23,6 +23,10 @@ Requires-Python: >=3.7
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
25
  Requires-Dist: attrs
26
+ Requires-Dist: importlib_metadata; python_version < "3.8"
27
+ Requires-Dist: typing_extensions; python_version < "3.8"
28
+ Provides-Extra: full
29
+ Requires-Dist: numpy; extra == "full"
26
30
 
27
31
  # typedparser
28
32
 
@@ -45,6 +49,12 @@ Requires-Dist: attrs
45
49
  <a href="https://github.com/simon-ging/typedparser/actions/workflows/build-py312.yml">
46
50
  <img alt="build 3.12 status" title="build 3.12 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/typedparser/build-py312.yml?branch=main&label=python%203.12" />
47
51
  </a>
52
+ <a href="https://github.com/simon-ging/typedparser/actions/workflows/build-py37-full.yml">
53
+ <img alt="build 3.7 full status" title="build 3.7 full status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/typedparser/build-py37-full.yml?branch=main&label=python%203.7%20full" />
54
+ </a>
55
+ <a href="https://github.com/simon-ging/typedparser/actions/workflows/build-py312-full.yml">
56
+ <img alt="build 3.12 full status" title="build 3.12 full status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/typedparser/build-py312-full.yml?branch=main&label=python%203.12%20full" />
57
+ </a>
48
58
  <img alt="coverage" title="coverage" src="https://raw.githubusercontent.com/simon-ging/typedparser/main/docs/coverage.svg" />
49
59
  <a href="https://pypi.org/project/typedparser/">
50
60
  <img alt="version" title="version" src="https://img.shields.io/pypi/v/typedparser?color=success" />
@@ -19,6 +19,12 @@
19
19
  <a href="https://github.com/simon-ging/typedparser/actions/workflows/build-py312.yml">
20
20
  <img alt="build 3.12 status" title="build 3.12 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/typedparser/build-py312.yml?branch=main&label=python%203.12" />
21
21
  </a>
22
+ <a href="https://github.com/simon-ging/typedparser/actions/workflows/build-py37-full.yml">
23
+ <img alt="build 3.7 full status" title="build 3.7 full status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/typedparser/build-py37-full.yml?branch=main&label=python%203.7%20full" />
24
+ </a>
25
+ <a href="https://github.com/simon-ging/typedparser/actions/workflows/build-py312-full.yml">
26
+ <img alt="build 3.12 full status" title="build 3.12 full status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/typedparser/build-py312-full.yml?branch=main&label=python%203.12%20full" />
27
+ </a>
22
28
  <img alt="coverage" title="coverage" src="https://raw.githubusercontent.com/simon-ging/typedparser/main/docs/coverage.svg" />
23
29
  <a href="https://pypi.org/project/typedparser/">
24
30
  <img alt="version" title="version" src="https://img.shields.io/pypi/v/typedparser?color=success" />
@@ -26,6 +26,9 @@ classifiers = [
26
26
  ]
27
27
  dynamic = ["version", "dependencies"]
28
28
 
29
+ [project.optional-dependencies]
30
+ full = ["numpy"]
31
+
29
32
  [project.urls]
30
33
  Project-URL = "https://github.com/simon-ging/typedparser"
31
34
 
@@ -0,0 +1,4 @@
1
+ attrs
2
+ importlib_metadata;python_version<'3.8'
3
+ typing_extensions;python_version<'3.8'
4
+
@@ -14,4 +14,4 @@ __all__ = [
14
14
  "get_attr_names",
15
15
  ]
16
16
 
17
- __version__ = "0.12.5"
17
+ __version__ = "0.13.2"
@@ -145,6 +145,12 @@ def _attrs_from_dict(
145
145
  ):
146
146
  if current_position is None:
147
147
  current_position = []
148
+ if isinstance(input_dict_or_attrs, str):
149
+ raise TypeError(
150
+ f"Expected a dictionary or attrs instance, got type '{type(input_dict_or_attrs)}' "
151
+ f"value '{input_dict_or_attrs}' at position '{'.'.join(current_position)}' (root "
152
+ f"if empty).\n\nError context: {more_error_info}."
153
+ )
148
154
  _print_fn(f"Parsing {cls} from {input_dict_or_attrs}")
149
155
  input_cls = type(input_dict_or_attrs)
150
156
  if has(input_cls):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: typedparser
3
- Version: 0.12.5
3
+ Version: 0.13.2
4
4
  Summary: Extension for python argparse with typehints and typechecks.
5
5
  Author: simon-ging
6
6
  License: Apache-2.0
@@ -23,6 +23,10 @@ Requires-Python: >=3.7
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
25
  Requires-Dist: attrs
26
+ Requires-Dist: importlib_metadata; python_version < "3.8"
27
+ Requires-Dist: typing_extensions; python_version < "3.8"
28
+ Provides-Extra: full
29
+ Requires-Dist: numpy; extra == "full"
26
30
 
27
31
  # typedparser
28
32
 
@@ -45,6 +49,12 @@ Requires-Dist: attrs
45
49
  <a href="https://github.com/simon-ging/typedparser/actions/workflows/build-py312.yml">
46
50
  <img alt="build 3.12 status" title="build 3.12 status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/typedparser/build-py312.yml?branch=main&label=python%203.12" />
47
51
  </a>
52
+ <a href="https://github.com/simon-ging/typedparser/actions/workflows/build-py37-full.yml">
53
+ <img alt="build 3.7 full status" title="build 3.7 full status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/typedparser/build-py37-full.yml?branch=main&label=python%203.7%20full" />
54
+ </a>
55
+ <a href="https://github.com/simon-ging/typedparser/actions/workflows/build-py312-full.yml">
56
+ <img alt="build 3.12 full status" title="build 3.12 full status" src="https://img.shields.io/github/actions/workflow/status/simon-ging/typedparser/build-py312-full.yml?branch=main&label=python%203.12%20full" />
57
+ </a>
48
58
  <img alt="coverage" title="coverage" src="https://raw.githubusercontent.com/simon-ging/typedparser/main/docs/coverage.svg" />
49
59
  <a href="https://pypi.org/project/typedparser/">
50
60
  <img alt="version" title="version" src="https://img.shields.io/pypi/v/typedparser?color=success" />
@@ -0,0 +1,8 @@
1
+ attrs
2
+
3
+ [:python_version < "3.8"]
4
+ importlib_metadata
5
+ typing_extensions
6
+
7
+ [full]
8
+ numpy
@@ -1 +0,0 @@
1
- attrs
File without changes
File without changes