paramfunc 0.0.1__tar.gz → 0.0.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.
- {paramfunc-0.0.1/src/paramfunc.egg-info → paramfunc-0.0.2}/PKG-INFO +2 -2
- {paramfunc-0.0.1 → paramfunc-0.0.2}/README.md +1 -1
- {paramfunc-0.0.1 → paramfunc-0.0.2}/pyproject.toml +1 -1
- {paramfunc-0.0.1 → paramfunc-0.0.2/src/paramfunc.egg-info}/PKG-INFO +2 -2
- {paramfunc-0.0.1 → paramfunc-0.0.2}/src/paramfunc.py +3 -3
- {paramfunc-0.0.1 → paramfunc-0.0.2}/LICENSE.txt +0 -0
- {paramfunc-0.0.1 → paramfunc-0.0.2}/setup.cfg +0 -0
- {paramfunc-0.0.1 → paramfunc-0.0.2}/src/__init__.py +0 -0
- {paramfunc-0.0.1 → paramfunc-0.0.2}/src/paramfunc.egg-info/SOURCES.txt +0 -0
- {paramfunc-0.0.1 → paramfunc-0.0.2}/src/paramfunc.egg-info/dependency_links.txt +0 -0
- {paramfunc-0.0.1 → paramfunc-0.0.2}/src/paramfunc.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: paramfunc
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Decorator and class for easy argument conversion and validation.
|
|
5
5
|
Author-email: "light.seeker" <light.the.seeker@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -68,7 +68,7 @@ If a keyword argument has no need for conversion or for checking against a varia
|
|
|
68
68
|
"params":[]
|
|
69
69
|
```
|
|
70
70
|
# ParamFunc
|
|
71
|
-
`@
|
|
71
|
+
`@parameterize` converts the function it is decorating into a `ParamFunc` object. This object has three instance variables:
|
|
72
72
|
|
|
73
73
|
`func`: the function that was decorated
|
|
74
74
|
|
|
@@ -53,7 +53,7 @@ If a keyword argument has no need for conversion or for checking against a varia
|
|
|
53
53
|
"params":[]
|
|
54
54
|
```
|
|
55
55
|
# ParamFunc
|
|
56
|
-
`@
|
|
56
|
+
`@parameterize` converts the function it is decorating into a `ParamFunc` object. This object has three instance variables:
|
|
57
57
|
|
|
58
58
|
`func`: the function that was decorated
|
|
59
59
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: paramfunc
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.2
|
|
4
4
|
Summary: Decorator and class for easy argument conversion and validation.
|
|
5
5
|
Author-email: "light.seeker" <light.the.seeker@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -68,7 +68,7 @@ If a keyword argument has no need for conversion or for checking against a varia
|
|
|
68
68
|
"params":[]
|
|
69
69
|
```
|
|
70
70
|
# ParamFunc
|
|
71
|
-
`@
|
|
71
|
+
`@parameterize` converts the function it is decorating into a `ParamFunc` object. This object has three instance variables:
|
|
72
72
|
|
|
73
73
|
`func`: the function that was decorated
|
|
74
74
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Decorator and class for easy argument conversion and validation."""
|
|
2
2
|
|
|
3
|
-
def parameterize(params
|
|
3
|
+
def parameterize(*,params=None,kwparams=None):
|
|
4
4
|
"""
|
|
5
5
|
Decorator function that converts the function into a callable ParamFunc object
|
|
6
6
|
|
|
@@ -18,13 +18,13 @@ def parameterize(params:list|None=None,kwparams:dict|None=None):
|
|
|
18
18
|
|
|
19
19
|
key word arguments with no conversion functions or parameters can be left empty
|
|
20
20
|
"""
|
|
21
|
-
def create_param_func(func
|
|
21
|
+
def create_param_func(func):
|
|
22
22
|
return ParamFunc(func,params=params,kwparams=kwparams)
|
|
23
23
|
return create_param_func
|
|
24
24
|
|
|
25
25
|
class ParamFunc:
|
|
26
26
|
|
|
27
|
-
def __init__(self,func
|
|
27
|
+
def __init__(self,func,params=None,kwparams=None):
|
|
28
28
|
"""
|
|
29
29
|
Format of params argument:
|
|
30
30
|
{"convert":convert,"params":[boolean functions]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|