diff options
author | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-09-09 23:05:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 23:05:00 +0200 |
commit | 0cc82c4c0de8771c1323cc2e183497d722ea5bfe (patch) | |
tree | 85ff551d96291e647a1b865ce13df9808ad3d4c5 /pylint/lint | |
parent | ddde4fc074d0b4ae678f5111aafd0f54f3ddf409 (diff) | |
download | pylint-git-0cc82c4c0de8771c1323cc2e183497d722ea5bfe.tar.gz |
Turn on ``mypy`` strict mode 🎉 (#7448)
* Ignore subclasses of Any
* Add ignores for imported code and remove casts
* Add disables for uninferable return values
* Turn on ``mypy`` strict mode
Diffstat (limited to 'pylint/lint')
-rw-r--r-- | pylint/lint/expand_modules.py | 2 | ||||
-rw-r--r-- | pylint/lint/pylinter.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pylint/lint/expand_modules.py b/pylint/lint/expand_modules.py index 27d4bd812..91887cd92 100644 --- a/pylint/lint/expand_modules.py +++ b/pylint/lint/expand_modules.py @@ -18,7 +18,7 @@ def _modpath_from_file(filename: str, is_namespace: bool, path: list[str]) -> li def _is_package_cb(inner_path: str, parts: list[str]) -> bool: return modutils.check_modpath_has_init(inner_path, parts) or is_namespace - return modutils.modpath_from_file_with_callback( + return modutils.modpath_from_file_with_callback( # type: ignore[no-any-return] filename, path=path, is_package_cb=_is_package_cb ) diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py index 7fb696fdb..121d0d7f8 100644 --- a/pylint/lint/pylinter.py +++ b/pylint/lint/pylinter.py @@ -95,7 +95,7 @@ def _load_reporter_by_class(reporter_class: str) -> type[BaseReporter]: class_name = qname.split(".")[-1] klass = getattr(module, class_name) assert issubclass(klass, BaseReporter), f"{klass} is not a BaseReporter" - return klass + return klass # type: ignore[no-any-return] # Python Linter class ######################################################### |