varname 0.13.1__py3-none-any.whl → 0.13.2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- varname/__init__.py +1 -1
- varname/helpers.py +3 -2
- {varname-0.13.1.dist-info → varname-0.13.2.dist-info}/METADATA +1 -1
- varname-0.13.2.dist-info/RECORD +10 -0
- varname-0.13.1.dist-info/RECORD +0 -10
- {varname-0.13.1.dist-info → varname-0.13.2.dist-info}/LICENSE +0 -0
- {varname-0.13.1.dist-info → varname-0.13.2.dist-info}/WHEEL +0 -0
varname/__init__.py
CHANGED
varname/helpers.py
CHANGED
@@ -153,7 +153,7 @@ class Wrapper:
|
|
153
153
|
)
|
154
154
|
|
155
155
|
|
156
|
-
def jsobj(*args: Any, **kwargs: Any) -> Dict[str, Any]:
|
156
|
+
def jsobj(*args: Any, vars_only: bool = True, **kwargs: Any) -> Dict[str, Any]:
|
157
157
|
"""A wrapper to create a JavaScript-like object
|
158
158
|
|
159
159
|
When an argument is passed as positional argument, the name of the variable
|
@@ -172,11 +172,12 @@ def jsobj(*args: Any, **kwargs: Any) -> Dict[str, Any]:
|
|
172
172
|
Args:
|
173
173
|
*args: The positional arguments
|
174
174
|
**kwargs: The keyword arguments
|
175
|
+
vars_only: Whether to only include variables in the output
|
175
176
|
|
176
177
|
Returns:
|
177
178
|
A dict-like object
|
178
179
|
"""
|
179
|
-
argnames: Tuple[str, ...] = argname("args") # type: ignore
|
180
|
+
argnames: Tuple[str, ...] = argname("args", vars_only=vars_only) # type: ignore
|
180
181
|
out = dict(zip(argnames, args))
|
181
182
|
out.update(kwargs)
|
182
183
|
return out
|
@@ -0,0 +1,10 @@
|
|
1
|
+
varname/__init__.py,sha256=5liGcc8MtbaaXusFuboC3Xf5rNHQv02YRqvNgd8HX10,369
|
2
|
+
varname/core.py,sha256=nntOVpiavXP0EXijTNF6xIe4mxvz_FRpBjrL9z_JHJ0,19311
|
3
|
+
varname/helpers.py,sha256=x52Fmxx7p9PMa3BFFXRD_zapoeBG0WVVU8S5hnHPh60,9354
|
4
|
+
varname/ignore.py,sha256=-VC3oqag44y2UlAw0ErYKHotx616qJL3Sjb_5y7Tw1c,14400
|
5
|
+
varname/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
6
|
+
varname/utils.py,sha256=ByHbUjbdMlHHckW4y77Jr_DHhkSmk8TabTy3INDJWsY,20971
|
7
|
+
varname-0.13.2.dist-info/LICENSE,sha256=3bS8O2tMbBPz8rWmZBAOzkHQjcK-b7KwFHyyghEZ-Ak,1063
|
8
|
+
varname-0.13.2.dist-info/METADATA,sha256=0LgE9BiDPKtkAeDy7VQGx1DSZyWtzRQdA7gCc_CWHv0,12845
|
9
|
+
varname-0.13.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
10
|
+
varname-0.13.2.dist-info/RECORD,,
|
varname-0.13.1.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
varname/__init__.py,sha256=Y3H1NDja1WelUPmgRVUikMOYdK31QRIL0MhfOH9hDRg,369
|
2
|
-
varname/core.py,sha256=nntOVpiavXP0EXijTNF6xIe4mxvz_FRpBjrL9z_JHJ0,19311
|
3
|
-
varname/helpers.py,sha256=ho5X2t3PiSYDexwpA4TO_l68VWh3HER7bsUKzcbiCNM,9242
|
4
|
-
varname/ignore.py,sha256=-VC3oqag44y2UlAw0ErYKHotx616qJL3Sjb_5y7Tw1c,14400
|
5
|
-
varname/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
6
|
-
varname/utils.py,sha256=ByHbUjbdMlHHckW4y77Jr_DHhkSmk8TabTy3INDJWsY,20971
|
7
|
-
varname-0.13.1.dist-info/LICENSE,sha256=3bS8O2tMbBPz8rWmZBAOzkHQjcK-b7KwFHyyghEZ-Ak,1063
|
8
|
-
varname-0.13.1.dist-info/METADATA,sha256=TFZcuBRdqmLps6fUjWOJbCoLWULzeg8PxSH_x2NcjxE,12845
|
9
|
-
varname-0.13.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
10
|
-
varname-0.13.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|