10000 🚨 Fix type annotation · pwwang/python-varname@add9cd8 · GitHub
[go: up one dir, main page]

Skip to content

Commit add9cd8

Browse files
committed
🚨 Fix type annotation
1 parent e91916c commit add9cd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎varname/helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Some helper functions builtin based upon core features"""
22
import inspect
33
from functools import partial, wraps
4-
from typing import Any, Callable, Mapping, Type, Union
4+
from typing import Any, Callable, Dict, Tuple, Type, Union
55

66
from .utils import IgnoreType
77
from .core import argname, varname
@@ -149,7 +149,7 @@ def __repr__(self) -> str:
149149
)
150150

151151

152-
def jsobj(*args, **kwargs) -> Mapping[str, Any]:
152+
def jsobj(*args: Any, **kwargs: Any) -> Dict[str, Any]:
153153
"""A wrapper to create a JavaScript-like object
154154
155155
When an argument is passed as positional argument, the name of the variable
@@ -172,7 +172,7 @@ def jsobj(*args, **kwargs) -> Mapping[str, Any]:
172172
Returns:
173173
A dict-like object
174174
"""
175-
argnames = argname("args")
175+
argnames: Tuple[str, ...] = argname("args") # type: ignore
176176
out = dict(zip(argnames, args))
177177
out.update(kwargs)
178178
return out

0 commit comments

Comments
 (0)
0