Skip to content

Commit 2e3778e

Browse files
[#4692] Add a regression test for inference crash
1 parent cafe3b4 commit 2e3778e

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Release date: TBA
2626

2727
Closes #4732
2828

29+
* Fix a crash when a AttributeInferenceError was not handled properly when
30+
failing to infer the real name of an import in astroid.
31+
32+
Closes #4692
33+
2934

3035
What's New in Pylint 2.9.4?
3136
===========================
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""Regression test for https://github.com/PyCQA/pylint/issues/4692."""
2+
3+
import click # [import-error]
4+
5+
6+
for name, item in click.__dict__.items():
7+
_ = isinstance(item, click.Command) and item != 'foo'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import-error:3:0::Unable to import 'click':HIGH

0 commit comments

Comments
 (0)