diff options
author | Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> | 2023-01-28 10:29:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 10:29:28 +0100 |
commit | 660405e6218258cee90570e8037c3b5e1440dcb6 (patch) | |
tree | 2271b821b65d23d861824f8c37a4109a9033edf8 /pylint | |
parent | eb950615d77a6b979af6e0d9954fdb4197f4a722 (diff) | |
download | pylint-git-660405e6218258cee90570e8037c3b5e1440dcb6.tar.gz |
Fix a false positive for ``redefined-variable-type`` when ``async`` methods are present. (#8123)
Closes #8120
Diffstat (limited to 'pylint')
-rw-r--r-- | pylint/extensions/redefined_variable_type.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pylint/extensions/redefined_variable_type.py b/pylint/extensions/redefined_variable_type.py index ae7344cc1..8d88d856e 100644 --- a/pylint/extensions/redefined_variable_type.py +++ b/pylint/extensions/redefined_variable_type.py @@ -46,8 +46,8 @@ class MultipleTypesChecker(BaseChecker): def leave_classdef(self, _: nodes.ClassDef) -> None: self._check_and_add_messages() - visit_functiondef = visit_classdef - leave_functiondef = leave_module = leave_classdef + visit_functiondef = visit_asyncfunctiondef = visit_classdef + leave_functiondef = leave_asyncfunctiondef = leave_module = leave_classdef def visit_module(self, _: nodes.Module) -> None: self._assigns: list[dict[str, list[tuple[nodes.Assign, str]]]] = [{}] |