diff options
author | Florian Bruhin <me@the-compiler.org> | 2019-07-04 10:41:22 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2019-07-04 10:41:22 +0200 |
commit | df7bd1bf239bb151ebca81ed2fbbcd9a60009ebd (patch) | |
tree | 4461feeef8f4326e422d4be991d7a60796ec71b6 | |
parent | 6ba6314f716ac8d35116b93a16139fadda627c30 (diff) | |
download | qutebrowser-df7bd1bf239bb151ebca81ed2fbbcd9a60009ebd.tar.gz qutebrowser-df7bd1bf239bb151ebca81ed2fbbcd9a60009ebd.zip |
Clean up imports
-rw-r--r-- | qutebrowser/misc/debugcachestats.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qutebrowser/misc/debugcachestats.py b/qutebrowser/misc/debugcachestats.py index d77f3dade..48974500e 100644 --- a/qutebrowser/misc/debugcachestats.py +++ b/qutebrowser/misc/debugcachestats.py @@ -24,17 +24,16 @@ dependencies as possible to avoid cyclic dependencies. """ import typing -from typing import TypeVar, Callable # The second element of each tuple should be a lru_cache wrapped function _CACHE_FUNCTIONS = [] # type: typing.List[typing.Tuple[str, typing.Any]] -_T = TypeVar('_T', bound=Callable) +_T = typing.TypeVar('_T', bound=typing.Callable) -def register(name: typing.Optional[str] = None) -> Callable[[_T], _T]: +def register(name: typing.Optional[str] = None) -> typing.Callable[[_T], _T]: """Register a lru_cache wrapped function for debug_cache_stats.""" def wrapper(fn: _T) -> _T: _CACHE_FUNCTIONS.append((fn.__name__ if name is None else name, fn)) |