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 in undefined-loop-variable with enumerate() #9876

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

jacobtylerwalls
Copy link
Member

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Regression in #7132
Closes #9875

@jacobtylerwalls jacobtylerwalls added this to the 3.2.7 milestone Aug 16, 2024
@jacobtylerwalls jacobtylerwalls changed the title Fix a crash in undefined-loop-variable Fix a crash in undefined-loop-variable with enumerate() Aug 16, 2024
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 95.80%. Comparing base (18f03b7) to head (38bc8d1).
Report is 100 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #9876   +/-   ##
=======================================
  Coverage   95.80%   95.80%           
=======================================
  Files         174      174           
  Lines       18939    18939           
=======================================
  Hits        18144    18144           
  Misses        795      795           
Files with missing lines Coverage Ξ”
pylint/checkers/variables.py 97.23% <100.00%> (ΓΈ)

@jacobtylerwalls jacobtylerwalls merged commit cb6db06 into main Aug 16, 2024
43 of 44 checks passed
@jacobtylerwalls jacobtylerwalls deleted the jtw/regression-enumerate branch August 16, 2024 13:57
github-actions bot pushed a commit that referenced this pull request Aug 16, 2024
jacobtylerwalls added a commit that referenced this pull request Aug 16, 2024
… with `enumerate()` (#9877)

* Fix a crash in `undefined-loop-variable` with `enumerate()` (#9876)

(cherry picked from commit cb6db06)

Co-authored-by: Jacob Walls <[email protected]>
Copy link
Contributor

πŸ€– Effect of this PR on checked open source code: πŸ€–

Effect on pytest:
The following messages are now emitted:

  1. unbalanced-tuple-unpacking:
    Possible unbalanced tuple unpacking with sequence defined at line 2328 of argparse: left side has 1 label, right side has 0 values
    https://github.com/pytest-dev/pytest/blob/9446f024df846eefb8f2213d2854f7ec5552822a/src/_pytest/config/argparsing.py#L479

The following messages are no longer emitted:

  1. unbalanced-tuple-unpacking:
    Possible unbalanced tuple unpacking with sequence defined at line 2325 of argparse: left side has 1 label, right side has 0 values
    https://github.com/pytest-dev/pytest/blob/9446f024df846eefb8f2213d2854f7ec5552822a/src/_pytest/config/argparsing.py#L479

This comment was generated for commit 38bc8d1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash F0002 AstroidError due to possibly undefined loop variable
2 participants