varname 0.13.0__py3-none-any.whl → 0.13.2__py3-none-any.whl

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.
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.0"
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
varname/py.typed ADDED
@@ -0,0 +1 @@
1
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: varname
3
- Version: 0.13.0
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
@@ -98,6 +98,12 @@ Thanks goes to these awesome people/projects:
98
98
  <br /><sub><b>@LawsOfSympathy</b></sub>
99
99
  </a>
100
100
  </td>
101
+ <td align="center" style="min-width: 75px">
102
+ <a href="https://github.com/elliotgunton">
103
+ <img src="https://avatars.githubusercontent.com/u/17798778?s=400&v=4" width="50px;" alt=""/>
104
+ <br /><sub><b>@elliotgunton</b></sub>
105
+ </a>
106
+ </td>
101
107
  </tr>
102
108
  </table>
103
109
 
@@ -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,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.8.1
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,9 +0,0 @@
1
- varname/__init__.py,sha256=UTuY7fG_AbLwpbhBnup66zRlEvl0WnG6exf5AvOyyp0,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/utils.py,sha256=ByHbUjbdMlHHckW4y77Jr_DHhkSmk8TabTy3INDJWsY,20971
6
- varname-0.13.0.dist-info/LICENSE,sha256=3bS8O2tMbBPz8rWmZBAOzkHQjcK-b7KwFHyyghEZ-Ak,1063
7
- varname-0.13.0.dist-info/METADATA,sha256=6YjfqWLcmjJ9TXHN5yLlAn0DHrBg3escnFyzqLgKdWM,12580
8
- varname-0.13.0.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
9
- varname-0.13.0.dist-info/RECORD,,