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 CHANGED
@@ -13,4 +13,4 @@ from .utils import (
13
13
  )
14
14
  from .core import varname, nameof, will, argname
15
15
 
16
- __version__ = "0.13.1"
16
+ __version__ = "0.13.2"
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: varname
3
- Version: 0.13.1
3
+ Version: 0.13.2
4
4
  Summary: Dark magics about variable names in python.
5
5
  Home-page: https://github.com/pwwang/python-varname
6
6
  License: MIT
@@ -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,,
@@ -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,,