diff options
| author | Nick Drozd <nicholasdrozd@gmail.com> | 2021-08-13 21:05:11 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-14 04:05:11 +0200 |
| commit | a12242b2f44d5244bd1cacc6bc78df8c9c8e4296 (patch) | |
| tree | 0e3bf7fd1a41ffa4bc415eaff3f4516d0406a242 | |
| parent | 728d2588ece4fe0248e259efe506993eecf62bd6 (diff) | |
| download | pylint-git-a12242b2f44d5244bd1cacc6bc78df8c9c8e4296.tar.gz | |
Enable some Pylint extensions (#4842)
| -rw-r--r-- | pylint/checkers/typecheck.py | 1 | ||||
| -rw-r--r-- | pylint/config/option_manager_mixin.py | 1 | ||||
| -rw-r--r-- | pylint/pyreverse/inspector.py | 2 | ||||
| -rw-r--r-- | pylintrc | 3 |
4 files changed, 5 insertions, 2 deletions
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index 360676b6e..3291393a4 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -1510,7 +1510,6 @@ accessed. Python regular expressions are accepted.", return None itemmethod = methods[0] except ( - astroid.NotFoundError, astroid.AttributeInferenceError, IndexError, ): diff --git a/pylint/config/option_manager_mixin.py b/pylint/config/option_manager_mixin.py index cf21a1d60..02c6997af 100644 --- a/pylint/config/option_manager_mixin.py +++ b/pylint/config/option_manager_mixin.py @@ -44,6 +44,7 @@ def _expand_default(self, option): @contextlib.contextmanager def _patch_optparse(): + # pylint: disable = redefined-variable-type orig_default = optparse.HelpFormatter try: optparse.HelpFormatter.expand_default = _expand_default diff --git a/pylint/pyreverse/inspector.py b/pylint/pyreverse/inspector.py index 7a509e16f..11dcf7179 100644 --- a/pylint/pyreverse/inspector.py +++ b/pylint/pyreverse/inspector.py @@ -172,7 +172,7 @@ class Linker(IdGeneratorMixIn, utils.LocalsVisitor): try: node.implements = list(interfaces(node, self.inherited_interfaces)) except astroid.InferenceError: - node.implements = () + node.implements = [] def visit_functiondef(self, node): """visit an astroid.Function node @@ -20,6 +20,9 @@ load-plugins= pylint.extensions.check_elif, pylint.extensions.bad_builtin, pylint.extensions.code_style, + pylint.extensions.overlapping_exceptions, + pylint.extensions.typing, + pylint.extensions.redefined_variable_type, # Use multiple processes to speed up Pylint. jobs=1 |
