Skip to content

Commit

Permalink
fix decorator type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiling-J committed Mar 3, 2023
1 parent 4603605 commit 7cb2c53
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ benchmark:

.PHONY: lint
lint:
poetry run mypy --ignore-missing-imports .
poetry run mypy --check-untyped-defs --ignore-missing-imports .
trace_bench:
poetry run python -m benchmarks.trace_bench
4 changes: 2 additions & 2 deletions benchmarks/benchmark_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def _(size):
elif request.param == "cachetools_lfu":

def _(size):
cache = LFUCache(size)
cache = LFUCache(size) # type: ignore
func = cached(cache)(get)
return func

Expand All @@ -134,7 +134,7 @@ def _(size):
elif request.param == "cachetools_lru":

def _(size):
cache = LRUCache(size)
cache = LRUCache(size) # type: ignore
func = cached(cache)(get)
return func

Expand Down
10 changes: 5 additions & 5 deletions theine/thenie.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def _remove(key: str):
def _len() -> int:
return len(hk_map)

gen.remove = _remove
gen.len = _len
gen.kh = kh_map
gen.hk = hk_map
gen.remove = _remove # type: ignore
gen.len = _len # type: ignore
gen.kh = kh_map # type: ignore
gen.hk = hk_map # type: ignore
return gen


Expand Down Expand Up @@ -129,7 +129,7 @@ class Cached(Protocol[P, R]):
def key(self, fn: Callable[P, Hashable]):
...

def __call__(self, *args: P.args, **kwargs: P.kwargs) -> R:
def __call__(self, *args, **kwargs) -> R:
...


Expand Down

0 comments on commit 7cb2c53

Please sign in to comment.