preparse 1.1.3__tar.gz → 1.1.5__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.
- {preparse-1.1.3 → preparse-1.1.5}/PKG-INFO +3 -3
- {preparse-1.1.3 → preparse-1.1.5}/docs/v1.1.rst +2 -2
- {preparse-1.1.3 → preparse-1.1.5}/pyproject.toml +3 -12
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_processing/__init__.py +3 -2
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_processing/parsing.py +6 -5
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_processing/pulling.py +4 -3
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/core/Click.py +2 -1
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/core/Optdict.py +16 -9
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/core/PreParser.py +14 -11
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/core/enums.py +2 -3
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/core/warnings.py +4 -3
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/tests/test_data_toml.py +6 -6
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/tests/test_enums.py +1 -1
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/tests/test_expit_toml.py +6 -6
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/tests/test_optdict.py +1 -1
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/tests/test_preparser.py +2 -2
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse.egg-info/PKG-INFO +3 -3
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse.egg-info/requires.txt +2 -2
- {preparse-1.1.3 → preparse-1.1.5}/LICENSE.txt +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/MANIFEST.in +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/README.rst +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/docs/v1.0.rst +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/setup.cfg +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/__init__.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_items/Bundle.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_items/Item.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_items/Long.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_items/Option.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_items/Positional.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_items/Special.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_items/__init__.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_processing/deparsing.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_processing/digesting.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_tests/__init__.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_tests/expit.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_utils/__init__.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/_utils/dataprop.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/core/__init__.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/py.typed +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/tests/__init__.py +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/tests/data.toml +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse/tests/expit.toml +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse.egg-info/SOURCES.txt +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse.egg-info/dependency_links.txt +0 -0
- {preparse-1.1.3 → preparse-1.1.5}/src/preparse.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: preparse
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.5
|
|
4
4
|
Summary: This project preparses args for further parsing later on.
|
|
5
5
|
Author-email: Johannes <johannes.programming@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,9 +19,9 @@ Requires-Python: >=3.11
|
|
|
19
19
|
Description-Content-Type: text/x-rst
|
|
20
20
|
License-File: LICENSE.txt
|
|
21
21
|
Requires-Dist: click<9,>=8.2
|
|
22
|
-
Requires-Dist: cmp3<2,>=1.
|
|
22
|
+
Requires-Dist: cmp3<2,>=1.1
|
|
23
23
|
Requires-Dist: copyable<2,>=1.1
|
|
24
|
-
Requires-Dist: datahold<4,>=3.0
|
|
24
|
+
Requires-Dist: datahold<4,>=3.0
|
|
25
25
|
Requires-Dist: datarepr<2,>=1.2
|
|
26
26
|
Requires-Dist: frozendict<3,>=2.4.7
|
|
27
27
|
Requires-Dist: setdoc<2,>=1.3
|
|
@@ -172,8 +172,8 @@ This ``property`` determines the approach to the special argument ``'--'``.
|
|
|
172
172
|
|
|
173
173
|
This method a ``dict`` representing the current instance.
|
|
174
174
|
|
|
175
|
-
``warn:
|
|
176
|
-
""""""""""""""""""""""""""""
|
|
175
|
+
``warn: Callable[[PreparseWarning], Any]``
|
|
176
|
+
""""""""""""""""""""""""""""""""""""""""""
|
|
177
177
|
|
|
178
178
|
This property holds a function that is called whenever ``parse_args`` encounters a warning.
|
|
179
179
|
The warning is given as the only positional arguments.
|
|
@@ -19,9 +19,9 @@ classifiers = [
|
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
21
|
"click>=8.2,<9",
|
|
22
|
-
"cmp3>=1.
|
|
22
|
+
"cmp3>=1.1,<2",
|
|
23
23
|
"copyable>=1.1,<2",
|
|
24
|
-
"datahold>=3.0
|
|
24
|
+
"datahold>=3.0,<4",
|
|
25
25
|
"datarepr>=1.2,<2",
|
|
26
26
|
"frozendict>=2.4.7,<3",
|
|
27
27
|
"setdoc>=1.3,<2",
|
|
@@ -36,7 +36,7 @@ license-files = [
|
|
|
36
36
|
name = "preparse"
|
|
37
37
|
readme = "README.rst"
|
|
38
38
|
requires-python = ">=3.11"
|
|
39
|
-
version = "1.1.
|
|
39
|
+
version = "1.1.5"
|
|
40
40
|
|
|
41
41
|
[project.urls]
|
|
42
42
|
Download = "https://pypi.org/project/preparse/#files"
|
|
@@ -50,12 +50,3 @@ files = [
|
|
|
50
50
|
]
|
|
51
51
|
python_version = "3.11"
|
|
52
52
|
strict = false
|
|
53
|
-
|
|
54
|
-
[[tool.mypy.overrides]]
|
|
55
|
-
module = [
|
|
56
|
-
"cmp3",
|
|
57
|
-
"cmp3.*",
|
|
58
|
-
"datahold",
|
|
59
|
-
"datahold.*",
|
|
60
|
-
]
|
|
61
|
-
ignore_missing_imports = true
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
from collections.abc import Iterable
|
|
1
2
|
from types import FunctionType
|
|
2
|
-
from typing import
|
|
3
|
+
from typing import Optional
|
|
3
4
|
|
|
4
5
|
from preparse._items import *
|
|
5
6
|
from preparse._processing.deparsing import *
|
|
@@ -13,7 +14,7 @@ __all__ = ["process"]
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
def process(
|
|
16
|
-
args: Optional[Iterable] = None,
|
|
17
|
+
args: Optional[Iterable[object]] = None,
|
|
17
18
|
*,
|
|
18
19
|
allowslong: bool,
|
|
19
20
|
allowsshort: bool,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
from collections.abc import Iterable
|
|
1
2
|
from types import FunctionType
|
|
2
|
-
from typing import
|
|
3
|
+
from typing import Any, Generator
|
|
3
4
|
|
|
4
5
|
from preparse._items.Bundle import Bundle
|
|
5
6
|
from preparse._items.Item import Item
|
|
@@ -26,7 +27,7 @@ def parse_bundling(
|
|
|
26
27
|
arg: str,
|
|
27
28
|
*,
|
|
28
29
|
cause: FunctionType,
|
|
29
|
-
optdict: dict,
|
|
30
|
+
optdict: dict[Any, Any],
|
|
30
31
|
) -> Bundle:
|
|
31
32
|
ans: Bundle
|
|
32
33
|
x: int
|
|
@@ -67,7 +68,7 @@ def parse_generator(
|
|
|
67
68
|
allowsshort: bool,
|
|
68
69
|
expectsabbr: bool,
|
|
69
70
|
expectsposix: bool,
|
|
70
|
-
optdict: dict,
|
|
71
|
+
optdict: dict[Any, Any],
|
|
71
72
|
prog: str,
|
|
72
73
|
warn: FunctionType,
|
|
73
74
|
) -> Generator[Any, Any, Any]:
|
|
@@ -137,7 +138,7 @@ def parse_long(
|
|
|
137
138
|
*,
|
|
138
139
|
cause: FunctionType,
|
|
139
140
|
expectsabbr: bool,
|
|
140
|
-
optdict: dict,
|
|
141
|
+
optdict: dict[Any, Any],
|
|
141
142
|
) -> Long:
|
|
142
143
|
ans: Long
|
|
143
144
|
parts: list[str]
|
|
@@ -187,7 +188,7 @@ def parse_option(
|
|
|
187
188
|
*,
|
|
188
189
|
cause: FunctionType,
|
|
189
190
|
expectsabbr: bool,
|
|
190
|
-
optdict: dict,
|
|
191
|
+
optdict: dict[Any, Any],
|
|
191
192
|
**kwargs: Any,
|
|
192
193
|
) -> Option:
|
|
193
194
|
if parse_islong(arg, **kwargs):
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import sys
|
|
2
|
-
from
|
|
2
|
+
from collections.abc import Iterable
|
|
3
|
+
from typing import Optional
|
|
3
4
|
|
|
4
5
|
from preparse._items.Item import Item
|
|
5
6
|
from preparse._items.Positional import Positional
|
|
@@ -7,9 +8,9 @@ from preparse._items.Positional import Positional
|
|
|
7
8
|
__all__ = ["pull"]
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
def pull(args: Optional[Iterable] = None) -> list[Item]:
|
|
11
|
+
def pull(args: Optional[Iterable[object]] = None) -> list[Item]:
|
|
11
12
|
"This method acquires args."
|
|
12
|
-
argiter: Iterable
|
|
13
|
+
argiter: Iterable[object]
|
|
13
14
|
if args is None:
|
|
14
15
|
argiter = sys.argv[1:]
|
|
15
16
|
else:
|
|
@@ -1,21 +1,28 @@
|
|
|
1
|
+
from collections.abc import Hashable
|
|
1
2
|
from typing import Any, Optional, Self
|
|
2
3
|
|
|
3
|
-
import cmp3
|
|
4
|
+
import cmp3
|
|
4
5
|
import datahold
|
|
5
6
|
import setdoc
|
|
6
7
|
from datarepr import datarepr
|
|
7
8
|
from frozendict import frozendict
|
|
8
9
|
|
|
9
|
-
from preparse.core.enums import
|
|
10
|
-
from preparse.core.warnings import *
|
|
10
|
+
from preparse.core.enums import Nargs
|
|
11
11
|
|
|
12
12
|
__all__ = ["Optdict"]
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
def nargs(value: Any, /) -> Nargs:
|
|
16
|
+
if isinstance(value, int):
|
|
17
|
+
return Nargs(value)
|
|
18
|
+
else:
|
|
19
|
+
return Nargs.OPTIONAL_ARGUMENT
|
|
20
|
+
|
|
21
|
+
|
|
15
22
|
class Optdict(cmp3.CmpABC, datahold.HoldDict[str, Nargs]):
|
|
16
23
|
__slots__ = ()
|
|
17
24
|
|
|
18
|
-
_data:
|
|
25
|
+
_data: frozendict[str, Nargs]
|
|
19
26
|
|
|
20
27
|
@setdoc.basic
|
|
21
28
|
def __cmp__(self: Self, other: Any, /) -> Optional[int]:
|
|
@@ -28,7 +35,7 @@ class Optdict(cmp3.CmpABC, datahold.HoldDict[str, Nargs]):
|
|
|
28
35
|
|
|
29
36
|
@setdoc.basic
|
|
30
37
|
def __init__(self: Self, data: Any = (), /) -> None:
|
|
31
|
-
datahold.HoldDict
|
|
38
|
+
datahold.HoldDict.__init__(self, data)
|
|
32
39
|
|
|
33
40
|
@setdoc.basic
|
|
34
41
|
def __repr__(self: Self, /) -> str:
|
|
@@ -36,16 +43,16 @@ class Optdict(cmp3.CmpABC, datahold.HoldDict[str, Nargs]):
|
|
|
36
43
|
|
|
37
44
|
__str__ = object.__str__
|
|
38
45
|
|
|
39
|
-
@property
|
|
46
|
+
@property # type: ignore[override]
|
|
40
47
|
def data(self: Self) -> frozendict[str, Nargs]:
|
|
41
|
-
return frozendict
|
|
48
|
+
return frozendict(self._data)
|
|
42
49
|
|
|
43
50
|
@data.setter
|
|
44
51
|
def data(self: Self, value: Any) -> None:
|
|
45
|
-
a: frozendict
|
|
52
|
+
a: frozendict[Hashable, object]
|
|
46
53
|
x: map
|
|
47
54
|
y: map
|
|
48
55
|
a = frozendict(value)
|
|
49
56
|
x = map(str, a.keys())
|
|
50
|
-
y = map(
|
|
57
|
+
y = map(nargs, a.values())
|
|
51
58
|
self._data = frozendict(zip(x, y, strict=True))
|
|
@@ -2,21 +2,21 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
|
-
import
|
|
6
|
-
from typing import
|
|
5
|
+
from collections.abc import Callable, Iterable
|
|
6
|
+
from typing import Any, Optional, Self, cast
|
|
7
7
|
|
|
8
8
|
import click as cl
|
|
9
9
|
import setdoc
|
|
10
10
|
from copyable import Copyable
|
|
11
|
-
from datarepr import datarepr
|
|
12
|
-
from tofunc import tofunc
|
|
11
|
+
from datarepr import datarepr # type: ignore[attr-defined]
|
|
12
|
+
from tofunc import tofunc # type: ignore[attr-defined]
|
|
13
13
|
|
|
14
14
|
from preparse._processing import *
|
|
15
15
|
from preparse._utils.dataprop import dataprop
|
|
16
16
|
from preparse.core.Click import Click
|
|
17
17
|
from preparse.core.enums import *
|
|
18
18
|
from preparse.core.Optdict import Optdict
|
|
19
|
-
from preparse.core.warnings import
|
|
19
|
+
from preparse.core.warnings import PreparseWarning
|
|
20
20
|
|
|
21
21
|
__all__ = ["PreParser"]
|
|
22
22
|
|
|
@@ -39,7 +39,7 @@ class PreParser(Copyable):
|
|
|
39
39
|
prog: Any = None,
|
|
40
40
|
reconcilesorders: Any = True,
|
|
41
41
|
special: Any = Tuning.MAINTAIN,
|
|
42
|
-
warn: Callable = str,
|
|
42
|
+
warn: Callable = str, # type: ignore[type-arg]
|
|
43
43
|
) -> None:
|
|
44
44
|
self._data: dict[str, Any]
|
|
45
45
|
self._data = dict()
|
|
@@ -68,7 +68,7 @@ class PreParser(Copyable):
|
|
|
68
68
|
return bool(value)
|
|
69
69
|
|
|
70
70
|
@dataprop
|
|
71
|
-
def bundling(self: Self, value:
|
|
71
|
+
def bundling(self: Self, value: int) -> Tuning:
|
|
72
72
|
"This property decides how to approach the bundling of short options."
|
|
73
73
|
return Tuning(value)
|
|
74
74
|
|
|
@@ -104,11 +104,11 @@ class PreParser(Copyable):
|
|
|
104
104
|
dataA = Optdict(value)
|
|
105
105
|
self._data["optdict"].clear()
|
|
106
106
|
self._data["optdict"].update(dataA)
|
|
107
|
-
return self._data["optdict"]
|
|
107
|
+
return cast(Optdict, self._data["optdict"])
|
|
108
108
|
|
|
109
109
|
def parse_args(
|
|
110
110
|
self: Self,
|
|
111
|
-
args: Optional[Iterable] = None,
|
|
111
|
+
args: Optional[Iterable[object]] = None,
|
|
112
112
|
) -> list[str]:
|
|
113
113
|
"This method parses args."
|
|
114
114
|
return process(args, **self.todict())
|
|
@@ -151,7 +151,7 @@ class PreParser(Copyable):
|
|
|
151
151
|
self.prog = ctx.info_name
|
|
152
152
|
|
|
153
153
|
@dataprop
|
|
154
|
-
def special(self: Self, value:
|
|
154
|
+
def special(self: Self, value: int) -> Tuning:
|
|
155
155
|
"This Tuning property determines the approach towards the special argument."
|
|
156
156
|
return Tuning(value)
|
|
157
157
|
|
|
@@ -167,6 +167,9 @@ class PreParser(Copyable):
|
|
|
167
167
|
return dict(ans)
|
|
168
168
|
|
|
169
169
|
@dataprop
|
|
170
|
-
def warn(
|
|
170
|
+
def warn(
|
|
171
|
+
self: Self,
|
|
172
|
+
value: Callable[[PreparseWarning], Any],
|
|
173
|
+
) -> Callable[[PreparseWarning], Any]:
|
|
171
174
|
"This property gives a function that takes in the warnings."
|
|
172
175
|
return tofunc(value)
|
|
@@ -5,7 +5,7 @@ between the values zero, meaning no, and one, meaning yes."""
|
|
|
5
5
|
|
|
6
6
|
import enum
|
|
7
7
|
import operator
|
|
8
|
-
from typing import
|
|
8
|
+
from typing import Self
|
|
9
9
|
|
|
10
10
|
__all__ = [
|
|
11
11
|
"Tuning",
|
|
@@ -15,8 +15,7 @@ __all__ = [
|
|
|
15
15
|
|
|
16
16
|
class BaseEnum(enum.IntEnum):
|
|
17
17
|
@classmethod
|
|
18
|
-
def _missing_(cls: type, value:
|
|
19
|
-
operator.index(value)
|
|
18
|
+
def _missing_(cls: type[Self], value: object) -> Self:
|
|
20
19
|
return cls(2)
|
|
21
20
|
|
|
22
21
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from abc import abstractmethod
|
|
2
|
-
from
|
|
2
|
+
from collections.abc import Iterable
|
|
3
|
+
from typing import Any, Self
|
|
3
4
|
|
|
4
5
|
import setdoc
|
|
5
6
|
from copyable import Copyable
|
|
@@ -113,7 +114,7 @@ class PreparseAmbiguousOptionWarning(PreparseLongonlyWarning):
|
|
|
113
114
|
|
|
114
115
|
@setdoc.basic
|
|
115
116
|
def __init__(
|
|
116
|
-
self: Self, *, prog: Any, option: Any, possibilities: Iterable
|
|
117
|
+
self: Self, *, prog: Any, option: Any, possibilities: Iterable[object]
|
|
117
118
|
) -> None:
|
|
118
119
|
self.prog = prog
|
|
119
120
|
self.option = option
|
|
@@ -129,7 +130,7 @@ class PreparseAmbiguousOptionWarning(PreparseLongonlyWarning):
|
|
|
129
130
|
return ans
|
|
130
131
|
|
|
131
132
|
@dataprop
|
|
132
|
-
def possibilities(self: Self, value: Iterable) -> tuple[str, ...]:
|
|
133
|
+
def possibilities(self: Self, value: Iterable[object]) -> tuple[str, ...]:
|
|
133
134
|
return tuple(map(str, value))
|
|
134
135
|
|
|
135
136
|
|
|
@@ -35,7 +35,7 @@ class TestDataToml(unittest.TestCase):
|
|
|
35
35
|
def test_0(self: Self) -> None:
|
|
36
36
|
data: dict[str, Any]
|
|
37
37
|
name: str
|
|
38
|
-
kwargs: dict
|
|
38
|
+
kwargs: dict[str, Any]
|
|
39
39
|
data = Utils.utils.get_data()
|
|
40
40
|
for name, kwargs in data.items():
|
|
41
41
|
with self.subTest(msg=name, **kwargs):
|
|
@@ -49,12 +49,12 @@ class TestDataToml(unittest.TestCase):
|
|
|
49
49
|
warnings: Any,
|
|
50
50
|
**kwargs: Any,
|
|
51
51
|
) -> None:
|
|
52
|
-
answer: list
|
|
53
|
-
capture: list
|
|
54
|
-
data: dict
|
|
55
|
-
erranswer: list
|
|
52
|
+
answer: list[Any]
|
|
53
|
+
capture: list[Any]
|
|
54
|
+
data: dict[str, Any]
|
|
55
|
+
erranswer: list[Any]
|
|
56
56
|
msg: str
|
|
57
|
-
superanswer: list
|
|
57
|
+
superanswer: list[Any]
|
|
58
58
|
parser: PreParser
|
|
59
59
|
capture = list()
|
|
60
60
|
|
|
@@ -3,7 +3,7 @@ import math
|
|
|
3
3
|
import tomllib
|
|
4
4
|
import unittest
|
|
5
5
|
from importlib import resources
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import Any, Self
|
|
7
7
|
|
|
8
8
|
from click.testing import CliRunner
|
|
9
9
|
|
|
@@ -17,8 +17,8 @@ class Utils(enum.Enum):
|
|
|
17
17
|
utils = None
|
|
18
18
|
|
|
19
19
|
@staticmethod
|
|
20
|
-
def get_data() -> dict:
|
|
21
|
-
data: dict
|
|
20
|
+
def get_data() -> dict[Any, Any]:
|
|
21
|
+
data: dict[Any, Any]
|
|
22
22
|
text: str
|
|
23
23
|
text = resources.read_text("preparse.tests", "expit.toml")
|
|
24
24
|
data = tomllib.loads(text)
|
|
@@ -45,7 +45,7 @@ class TestMainFunction(unittest.TestCase):
|
|
|
45
45
|
stdout: Any,
|
|
46
46
|
stderr: Any,
|
|
47
47
|
) -> None:
|
|
48
|
-
extra: dict
|
|
48
|
+
extra: dict[Any, Any]
|
|
49
49
|
result: Any
|
|
50
50
|
runner: CliRunner
|
|
51
51
|
runner = CliRunner()
|
|
@@ -65,8 +65,8 @@ class TestMainFunction(unittest.TestCase):
|
|
|
65
65
|
self.assertEqual(stderr, result.stderr)
|
|
66
66
|
|
|
67
67
|
def test_0(self: Self) -> None:
|
|
68
|
-
data: dict
|
|
69
|
-
kwargs: dict
|
|
68
|
+
data: dict[Any, Any]
|
|
69
|
+
kwargs: dict[Any, Any]
|
|
70
70
|
name: str
|
|
71
71
|
data = Utils.utils.get_data()
|
|
72
72
|
for name, kwargs in data.items():
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import unittest
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Any, Self
|
|
3
3
|
|
|
4
4
|
from preparse.core.Click import Click
|
|
5
5
|
from preparse.core.enums import *
|
|
@@ -29,7 +29,7 @@ class TestPreParser(unittest.TestCase):
|
|
|
29
29
|
self.assertEqual(parser.optdict, parser_copy.optdict)
|
|
30
30
|
|
|
31
31
|
def test_preparser_todict(self: Self) -> None:
|
|
32
|
-
expected_keys: list
|
|
32
|
+
expected_keys: list[Any]
|
|
33
33
|
parser: PreParser
|
|
34
34
|
result: Any
|
|
35
35
|
parser = PreParser()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: preparse
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.5
|
|
4
4
|
Summary: This project preparses args for further parsing later on.
|
|
5
5
|
Author-email: Johannes <johannes.programming@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,9 +19,9 @@ Requires-Python: >=3.11
|
|
|
19
19
|
Description-Content-Type: text/x-rst
|
|
20
20
|
License-File: LICENSE.txt
|
|
21
21
|
Requires-Dist: click<9,>=8.2
|
|
22
|
-
Requires-Dist: cmp3<2,>=1.
|
|
22
|
+
Requires-Dist: cmp3<2,>=1.1
|
|
23
23
|
Requires-Dist: copyable<2,>=1.1
|
|
24
|
-
Requires-Dist: datahold<4,>=3.0
|
|
24
|
+
Requires-Dist: datahold<4,>=3.0
|
|
25
25
|
Requires-Dist: datarepr<2,>=1.2
|
|
26
26
|
Requires-Dist: frozendict<3,>=2.4.7
|
|
27
27
|
Requires-Dist: setdoc<2,>=1.3
|
|
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
|
|
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
|