Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a crash when TYPE_CHECKING is used without importing it #8435

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Closes #8434

@codecov
Copy link

codecov bot commented Mar 11, 2023

Codecov Report

Merging #8435 (0748afe) into main (74e6efc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8435   +/-   ##
=======================================
  Coverage   95.73%   95.73%           
=======================================
  Files         174      174           
  Lines       18392    18395    +3     
=======================================
+ Hits        17607    17610    +3     
  Misses        785      785           
Impacted Files Coverage Ξ”
pylint/checkers/utils.py 96.03% <100.00%> (+0.01%) ⬆️

@Pierre-Sassoulas Pierre-Sassoulas added the Crash πŸ’₯ A bug that makes pylint crash label Mar 11, 2023
@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 0748afe

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice !

@jacobtylerwalls jacobtylerwalls merged commit 4c56ba8 into pylint-dev:main Mar 11, 2023
@jacobtylerwalls jacobtylerwalls deleted the fix-crash-no-type-checking-import branch March 11, 2023 19:54
github-actions bot pushed a commit that referenced this pull request Mar 11, 2023
Pierre-Sassoulas pushed a commit that referenced this pull request Mar 11, 2023
…#8436)

(cherry picked from commit 4c56ba8)

Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported Crash πŸ’₯ A bug that makes pylint crash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

in_type_checking_block can crash if you haven't imported TYPE_CHECKING
2 participants