Upgrade mypy to 0.910.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
626359596e
commit
d32d442c44
|
@ -10,5 +10,8 @@ pytest-cov
|
||||||
-e ./zulip_bots
|
-e ./zulip_bots
|
||||||
-e ./zulip_botserver
|
-e ./zulip_botserver
|
||||||
-e git+https://github.com/zulip/zulint@14e3974001bf8442a6a3486125865660f1f2eb68#egg=zulint==1.0.0
|
-e git+https://github.com/zulip/zulint@14e3974001bf8442a6a3486125865660f1f2eb68#egg=zulint==1.0.0
|
||||||
mypy==0.812
|
mypy==0.910
|
||||||
|
types-python-dateutil
|
||||||
|
types-pytz
|
||||||
|
types-requests
|
||||||
gitlint>=0.13.0
|
gitlint>=0.13.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import pkgutil
|
import pkgutil
|
||||||
from typing import Iterable
|
from typing import List
|
||||||
|
|
||||||
__path__ = pkgutil.extend_path(__path__, __name__) # type: Iterable[str]
|
__path__ = pkgutil.extend_path(__path__, __name__) # type: List[str]
|
||||||
|
|
|
@ -80,6 +80,8 @@ def get_handle(location: str) -> Optional[Callable[[Dict[str, Any]], Optional[st
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
spec = importlib.util.spec_from_file_location("module.name", location)
|
spec = importlib.util.spec_from_file_location("module.name", location)
|
||||||
|
if spec is None:
|
||||||
|
return None
|
||||||
handler = importlib.util.module_from_spec(spec)
|
handler = importlib.util.module_from_spec(spec)
|
||||||
loader = spec.loader
|
loader = spec.loader
|
||||||
if not isinstance(loader, importlib.abc.Loader):
|
if not isinstance(loader, importlib.abc.Loader):
|
||||||
|
|
|
@ -13,6 +13,8 @@ import importlib_metadata as metadata
|
||||||
|
|
||||||
def import_module_from_source(path: str, name: str) -> Any:
|
def import_module_from_source(path: str, name: str) -> Any:
|
||||||
spec = importlib.util.spec_from_file_location(name, path)
|
spec = importlib.util.spec_from_file_location(name, path)
|
||||||
|
if spec is None:
|
||||||
|
return None
|
||||||
module = importlib.util.module_from_spec(spec)
|
module = importlib.util.module_from_spec(spec)
|
||||||
loader = spec.loader
|
loader = spec.loader
|
||||||
if not isinstance(loader, importlib.abc.Loader):
|
if not isinstance(loader, importlib.abc.Loader):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import pkgutil
|
import pkgutil
|
||||||
from typing import Iterable
|
from typing import List
|
||||||
|
|
||||||
__path__ = pkgutil.extend_path(__path__, __name__) # type: Iterable[str]
|
__path__ = pkgutil.extend_path(__path__, __name__) # type: List[str]
|
||||||
|
|
Loading…
Reference in a new issue