[mypy] Enforcing typing for superset.models (#9883)

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2020-05-22 20:31:21 -07:00
committed by GitHub
parent 6d4e23663e
commit e789a35558
14 changed files with 207 additions and 130 deletions

View File

@@ -143,7 +143,7 @@ class _memoized:
self.func = func
self.cache = {}
self.is_method = False
self.watch = watch
self.watch = watch or []
def __call__(self, *args, **kwargs):
key = [args, frozenset(kwargs.items())]
@@ -172,7 +172,7 @@ class _memoized:
return functools.partial(self.__call__, obj)
def memoized(func=None, watch=None):
def memoized(func: Optional[Callable] = None, watch: Optional[List[str]] = None):
if func:
return _memoized(func)
else: