Skip to content

Commit

Permalink
[crash] Fix crashes on python interpreter < 3.9 (#8163) (#8165)
Browse files Browse the repository at this point in the history
Closes #8161

Co-authored-by: Marc Schmitzer <marc@solute.de>
(cherry picked from commit 4689b19)

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
  • Loading branch information
github-actions[bot] and Pierre-Sassoulas committed Feb 2, 2023
1 parent 0fba80c commit 40f6711
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/whatsnew/fragments/8161.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix a crash happening for python interpreter < 3.9 following a failed typing update.

Closes #8161
2 changes: 1 addition & 1 deletion pylint/checkers/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def _make_tree_defs(mod_files_list: ItemsView[str, set[str]]) -> _ImportTree:
assert isinstance(node[0], dict)
node = node[0].setdefault(prefix, ({}, [])) # type: ignore[arg-type,assignment]
assert isinstance(node[1], list)
node[1] += files
node[1].extend(files)
return tree_defs


Expand Down

0 comments on commit 40f6711

Please sign in to comment.