parameter-toolkit 0.1.0__tar.gz → 0.1.1__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.
- {parameter_toolkit-0.1.0 → parameter_toolkit-0.1.1}/PKG-INFO +1 -1
- {parameter_toolkit-0.1.0 → parameter_toolkit-0.1.1}/pyproject.toml +1 -1
- {parameter_toolkit-0.1.0 → parameter_toolkit-0.1.1}/src/parameter_toolkit/parameter_tools.py +5 -1
- {parameter_toolkit-0.1.0 → parameter_toolkit-0.1.1}/README.md +0 -0
- {parameter_toolkit-0.1.0 → parameter_toolkit-0.1.1}/src/parameter_toolkit/__init__.py +0 -0
- {parameter_toolkit-0.1.0 → parameter_toolkit-0.1.1}/src/parameter_toolkit/stringparameter_tools.py +0 -0
{parameter_toolkit-0.1.0 → parameter_toolkit-0.1.1}/src/parameter_toolkit/parameter_tools.py
RENAMED
|
@@ -76,7 +76,8 @@ class ParameterConvertor:
|
|
|
76
76
|
|
|
77
77
|
class ParameterExtractor:
|
|
78
78
|
""" Provides Generator to get Parameters of a Function or Parameters Literal"""
|
|
79
|
-
|
|
79
|
+
|
|
80
|
+
@staticmethod
|
|
80
81
|
def extractPara(func:Callable) -> Generator[Parameter,None,int]:
|
|
81
82
|
"""Iter thorugh signature and yield its parameters.
|
|
82
83
|
**yields:** `<inspect.Parameter>`
|
|
@@ -87,15 +88,18 @@ class ParameterExtractor:
|
|
|
87
88
|
yield parameter
|
|
88
89
|
return paraLen
|
|
89
90
|
|
|
91
|
+
@staticmethod
|
|
90
92
|
def getPMList(func:function) -> list[Parameter]:
|
|
91
93
|
"""Returns a `list` of `Parameter` objects. """
|
|
92
94
|
return [pm for pm in signature(func).parameters.values()]
|
|
93
95
|
|
|
96
|
+
@staticmethod
|
|
94
97
|
def getPMDict(func:function) -> dict[str,Parameter]:
|
|
95
98
|
return signature(func).parameters
|
|
96
99
|
|
|
97
100
|
class ParameterMapper:
|
|
98
101
|
"""Provides Mapping shortcut for partial(postionals, keywordsargs)."""
|
|
99
102
|
|
|
103
|
+
@staticmethod
|
|
100
104
|
def mapFunc(func, positinals:Iterable, keywords:dict) ->partial:
|
|
101
105
|
return partial(func, *positinals, **keywords)
|
|
File without changes
|
|
File without changes
|
{parameter_toolkit-0.1.0 → parameter_toolkit-0.1.1}/src/parameter_toolkit/stringparameter_tools.py
RENAMED
|
File without changes
|