general: update mypy config, seems that logs of type: ignore aren't necessary anymore
This commit is contained in:
parent
8fc4951c57
commit
fe2c99f037
52 changed files with 142 additions and 105 deletions
|
@ -7,16 +7,16 @@ from typing import Sequence, Optional
|
|||
from . import warnings, PathIsh, Path
|
||||
|
||||
try:
|
||||
from my.config import core as user_config # type: ignore[attr-defined]
|
||||
from my.config import core as user_config # type: ignore[attr-defined]
|
||||
except Exception as e:
|
||||
try:
|
||||
from my.config import common as user_config # type: ignore[attr-defined, assignment, misc]
|
||||
from my.config import common as user_config # type: ignore[attr-defined]
|
||||
warnings.high("'common' config section is deprecated. Please rename it to 'core'.")
|
||||
except Exception as e2:
|
||||
# make it defensive, because it's pretty commonly used and would be annoying if it breaks hpi doctor etc.
|
||||
# this way it'll at least use the defaults
|
||||
# todo actually not sure if needs a warning? Perhaps it's okay without it, because the defaults are reasonable enough
|
||||
user_config = object # type: ignore[assignment, misc]
|
||||
user_config = object
|
||||
|
||||
|
||||
_HPI_CACHE_DIR_DEFAULT = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue