Skip to content

Commit 40f6711

Browse files
[crash] Fix crashes on python interpreter < 3.9 (#8163) (#8165)
Closes #8161 Co-authored-by: Marc Schmitzer <[email protected]> (cherry picked from commit 4689b19) Co-authored-by: Pierre Sassoulas <[email protected]>
1 parent 0fba80c commit 40f6711

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

doc/whatsnew/fragments/8161.bugfix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Fix a crash happening for python interpreter < 3.9 following a failed typing update.
2+
3+
Closes #8161

pylint/checkers/imports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def _make_tree_defs(mod_files_list: ItemsView[str, set[str]]) -> _ImportTree:
176176
assert isinstance(node[0], dict)
177177
node = node[0].setdefault(prefix, ({}, [])) # type: ignore[arg-type,assignment]
178178
assert isinstance(node[1], list)
179-
node[1] += files
179+
node[1].extend(files)
180180
return tree_defs
181181

182182

0 commit comments

Comments
 (0)