diff --git a/ChangeLog b/ChangeLog index 8fbe87334a5..5806afcd464 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,11 @@ Release date: TBA Closes #4732 +* Fix a crash when a AttributeInferenceError was raised when + failing to find the real name in infer_import_from. + + Closes #4692 + What's New in Pylint 2.9.4? =========================== diff --git a/tests/functional/i/inference_crash_4692.py b/tests/functional/i/inference_crash_4692.py new file mode 100644 index 00000000000..5b21fb9f1f9 --- /dev/null +++ b/tests/functional/i/inference_crash_4692.py @@ -0,0 +1,7 @@ +"""Regression test for https://github.com/PyCQA/pylint/issues/4692.""" + +import click + + +for name, item in click.__dict__.items(): + _ = isinstance(item, click.Command) and item != 'foo'