general: fix ignores after mypy version update
This commit is contained in:
parent
0512488241
commit
68289c1be3
4 changed files with 4 additions and 4 deletions
|
@ -42,7 +42,7 @@ __all__ = [
|
||||||
# you could put _init_hook.py next to your private my/config
|
# you could put _init_hook.py next to your private my/config
|
||||||
# that way you can configure logging/warnings/env variables on every HPI import
|
# that way you can configure logging/warnings/env variables on every HPI import
|
||||||
try:
|
try:
|
||||||
import my._init_hook # type: ignore[import]
|
import my._init_hook # type: ignore[import-not-found]
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
##
|
##
|
||||||
|
|
|
@ -86,7 +86,7 @@ def ensure_unique(
|
||||||
for i in it:
|
for i in it:
|
||||||
k = key(i)
|
k = key(i)
|
||||||
v = value(i)
|
v = value(i)
|
||||||
pv = key2value.get(k, None) # type: ignore
|
pv = key2value.get(k, None)
|
||||||
if pv is not None:
|
if pv is not None:
|
||||||
raise RuntimeError(f"Duplicate key: {k}. Previous value: {pv}, new value: {v}")
|
raise RuntimeError(f"Duplicate key: {k}. Previous value: {pv}, new value: {v}")
|
||||||
key2value[k] = v
|
key2value[k] = v
|
||||||
|
|
|
@ -230,7 +230,7 @@ def get_enlighten():
|
||||||
return Mock()
|
return Mock()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import enlighten # type: ignore[import]
|
import enlighten # type: ignore[import-untyped]
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError:
|
||||||
warnings.warn("You might want to 'pip install enlighten' for a nice progress bar")
|
warnings.warn("You might want to 'pip install enlighten' for a nice progress bar")
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ from typing import Iterable
|
||||||
from .core import Res, get_files
|
from .core import Res, get_files
|
||||||
from .core.common import isoparse, Json
|
from .core.common import isoparse, Json
|
||||||
|
|
||||||
import tcxparser # type: ignore[import]
|
import tcxparser # type: ignore[import-untyped]
|
||||||
|
|
||||||
from my.config import runnerup as config
|
from my.config import runnerup as config
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue