mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
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:
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user