paramflow 0.5__tar.gz → 0.5.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.
- {paramflow-0.5/paramflow.egg-info → paramflow-0.5.2}/PKG-INFO +1 -1
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/convert.cpython-313.pyc +0 -0
- paramflow-0.5.2/paramflow/__pycache__/frozen.cpython-313.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/parser.cpython-313.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/convert.py +5 -10
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/frozen.py +3 -1
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/parser.py +3 -0
- {paramflow-0.5 → paramflow-0.5.2/paramflow.egg-info}/PKG-INFO +1 -1
- {paramflow-0.5 → paramflow-0.5.2}/setup.py +1 -1
- paramflow-0.5/paramflow/__pycache__/frozen.cpython-313.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/LICENSE +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/MANIFEST.in +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/README.md +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__init__.py +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/__init__.cpython-312.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/__init__.cpython-313.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/convert.cpython-312.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/frozen.cpython-312.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/frozen_test.cpython-312-pytest-8.3.4.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/params.cpython-312.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/params.cpython-313.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/params_test.cpython-312-pytest-8.3.4.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/parser.cpython-312.pyc +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow/params.py +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow.egg-info/SOURCES.txt +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow.egg-info/dependency_links.txt +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow.egg-info/requires.txt +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/paramflow.egg-info/top_level.txt +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/pyproject.toml +0 -0
- {paramflow-0.5 → paramflow-0.5.2}/setup.cfg +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -36,15 +36,10 @@ def convert_type(dst_value, src_value, path=''):
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def infer_type(value: str):
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
result = float(value)
|
|
43
|
-
except ValueError:
|
|
44
|
-
pass
|
|
45
|
-
else:
|
|
39
|
+
try:
|
|
40
|
+
return int(value)
|
|
41
|
+
except ValueError:
|
|
46
42
|
try:
|
|
47
|
-
|
|
43
|
+
return float(value)
|
|
48
44
|
except ValueError:
|
|
49
|
-
|
|
50
|
-
return result
|
|
45
|
+
return value
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Union, List, Dict
|
|
1
|
+
from typing import Union, List, Dict, Any
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class ParamsDict(dict):
|
|
@@ -19,6 +19,8 @@ class ParamsDict(dict):
|
|
|
19
19
|
def __delitem__(self, key):
|
|
20
20
|
raise TypeError(f'{self.__class__.__name__} is immutable')
|
|
21
21
|
|
|
22
|
+
def __getattr__(self, key) -> Any:
|
|
23
|
+
return self[key]
|
|
22
24
|
|
|
23
25
|
class ParamsList(list):
|
|
24
26
|
|
|
@@ -176,7 +176,10 @@ class ArgsParser(Parser):
|
|
|
176
176
|
args_params[key] = arg_value
|
|
177
177
|
|
|
178
178
|
if self.consume_args:
|
|
179
|
+
help = '--help' in sys.argv
|
|
179
180
|
sys.argv = [sys.argv[0]] + remaining
|
|
181
|
+
if help:
|
|
182
|
+
sys.argv.append('--help')
|
|
180
183
|
else:
|
|
181
184
|
it = iter(remaining)
|
|
182
185
|
for arg_name, arg_value in zip(it, it):
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/frozen_test.cpython-312-pytest-8.3.4.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{paramflow-0.5 → paramflow-0.5.2}/paramflow/__pycache__/params_test.cpython-312-pytest-8.3.4.pyc
RENAMED
|
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
|