varname 0.13.1__py3-none-any.whl → 0.13.3__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 +14 -2
- {varname-0.13.1.dist-info → varname-0.13.3.dist-info}/METADATA +1 -1
- varname-0.13.3.dist-info/RECORD +10 -0
- varname-0.13.1.dist-info/RECORD +0 -10
- {varname-0.13.1.dist-info → varname-0.13.3.dist-info}/LICENSE +0 -0
- {varname-0.13.1.dist-info → varname-0.13.3.dist-info}/WHEEL +0 -0
varname/__init__.py
CHANGED
varname/helpers.py
CHANGED
@@ -153,7 +153,12 @@ class Wrapper:
|
|
153
153
|
)
|
154
154
|
|
155
155
|
|
156
|
-
def jsobj(
|
156
|
+
def jsobj(
|
157
|
+
*args: Any,
|
158
|
+
vars_only: bool = True,
|
159
|
+
frame: int = 1,
|
160
|
+
**kwargs: Any,
|
161
|
+
) -> Dict[str, Any]:
|
157
162
|
"""A wrapper to create a JavaScript-like object
|
158
163
|
|
159
164
|
When an argument is passed as positional argument, the name of the variable
|
@@ -171,12 +176,19 @@ def jsobj(*args: Any, **kwargs: Any) -> Dict[str, Any]:
|
|
171
176
|
|
172
177
|
Args:
|
173
178
|
*args: The positional arguments
|
179
|
+
vars_only: Whether to only include variables in the output
|
180
|
+
frame: The call stack index. You can understand this as the number of
|
181
|
+
wrappers around this function - 1.
|
174
182
|
**kwargs: The keyword arguments
|
175
183
|
|
176
184
|
Returns:
|
177
185
|
A dict-like object
|
178
186
|
"""
|
179
|
-
argnames: Tuple[str, ...] = argname(
|
187
|
+
argnames: Tuple[str, ...] = argname(
|
188
|
+
"args",
|
189
|
+
vars_only=vars_only,
|
190
|
+
frame=frame,
|
191
|
+
) # type: ignore
|
180
192
|
out = dict(zip(argnames, args))
|
181
193
|
out.update(kwargs)
|
182
194
|
return out
|
@@ -0,0 +1,10 @@
|
|
1
|
+
varname/__init__.py,sha256=t8c8kQ_kutj1vYQGREj-h4t6v18YVuTY7kNlqMJgecA,369
|
2
|
+
varname/core.py,sha256=nntOVpiavXP0EXijTNF6xIe4mxvz_FRpBjrL9z_JHJ0,19311
|
3
|
+
varname/helpers.py,sha256=jZaP-qWQJwi8T2f886eHOj-llXAPHk5SMU6PfVn-9dg,9558
|
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.3.dist-info/LICENSE,sha256=3bS8O2tMbBPz8rWmZBAOzkHQjcK-b7KwFHyyghEZ-Ak,1063
|
8
|
+
varname-0.13.3.dist-info/METADATA,sha256=a0wq2f5PAU1d45rU2XsjUkN29pEcAwMF6oBv59_4ZCU,12845
|
9
|
+
varname-0.13.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
10
|
+
varname-0.13.3.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
|