From 5ffa62f9638b44db8df7882bb79be2728085442f Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Wed, 1 Sep 2021 22:41:22 +0200 Subject: [PATCH] Fix bad node being given as context for message See https://github.com/PyCQA/pylint/issues/4711\#issuecomment-910020972 --- pylint/checkers/variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py index 411e016f5e..ac6ef06707 100644 --- a/pylint/checkers/variables.py +++ b/pylint/checkers/variables.py @@ -2019,7 +2019,7 @@ def _check_all(self, node, not_consumed): return if not isinstance(assigned, (nodes.Tuple, nodes.List, list, tuple)): - self.add_message("invalid-all-format", node=assigned) + self.add_message("invalid-all-format", node=node) return for elt in getattr(assigned, "elts", ()):