Disallow untyped decorators

This commit is contained in:
Kovid Goyal 2020-03-14 14:50:04 +05:30
parent a70fa9abc5
commit 5f06d3a427
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 1 deletions

View File

@ -256,7 +256,7 @@ def init_config(default_config_lines: Iterable[str], parse_config: Callable) ->
return Options, defaults
def key_func() -> Tuple[Callable, Dict[str, Callable]]:
def key_func() -> Tuple[Callable[..., Callable], Dict[str, Callable]]:
ans: Dict[str, Callable] = {}
def func_with_args(*names: str) -> Callable:

View File

@ -26,6 +26,7 @@ warn_no_return = False
warn_unused_configs = True
check_untyped_defs = True
disallow_untyped_defs = True
disallow_untyped_decorators = True
[mypy-conf]
# ignored because on the CI server sphinx type stubs are available somehow, but