From 7120d894635662d49b05c0cc5d664b5a25544605 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Fri, 6 Mar 2020 13:21:12 +0100 Subject: Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name If `Module.getattr` received an empty string (as a result of inference for example), `astroid` would have returned the same Module again, which leads to false positives in pylint, since the expected output was of a different type. Rather than allowing empty names to pass through `getattr()`, we simply raise an error earlier. Close PyCQA/pylint#2991 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 2e712db2..7485f123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,10 @@ Release Date: TBA Close PyCQA/pylint#3417 +* Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name + + Close PyCQA/pylint#2991 + * ``NodeNG.bool_value()`` gained an optional ``context`` parameter We need to pass an inference context downstream when inferring the boolean -- cgit v1.2.1