Add explicit Optional annotation

This isn't a mypy issue -- there's no way it could otherwise know
that this `None` value is in fact an optional callable.
This commit is contained in:
Peter Law
2020-07-26 14:43:41 +01:00
parent 19b8eaea59
commit 6364dd1511
2 changed files with 2 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
import os
import time
from contextlib import contextmanager
from typing import Callable, Optional
_inited = False
@@ -62,7 +63,7 @@ enable_warning = False
enable_notice = False
# callback, interface: level, str
debug_function = None
debug_function: Optional[Callable[[str, str], None]] = None
_debug_indent = 0
_start_time = time.time()

View File

@@ -57,8 +57,3 @@ strict_equality = True
[mypy-jedi,jedi.inference.compiled,jedi.inference.value]
# Various __init__.py files which contain re-exports we want to implicitly make.
implicit_reexport = True
[mypy-jedi.debug]
# jedi.debug is configured by setting module-level values, which mypy doesn't
# know about. See https://github.com/python/mypy/issues/9209.
warn_unreachable = False