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

Regression fix for unused-variable false negative #8684

Merged
merged 7 commits into from
May 15, 2023

Conversation

zenlyj
Copy link
Contributor

@zenlyj zenlyj commented May 14, 2023

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

This is a fix for a false negative regression caused by #8441. The issue lies in _defines_name_raises_or_returns(), which returns false even when an exception variable defines the given name.

Closes #8595

@codecov
Copy link

codecov bot commented May 14, 2023

Codecov Report

Merging #8684 (3bc94ee) into main (4e48d46) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8684   +/-   ##
=======================================
  Coverage   95.80%   95.80%           
=======================================
  Files         172      172           
  Lines       18300    18302    +2     
=======================================
+ Hits        17533    17535    +2     
  Misses        767      767           
Impacted Files Coverage Ξ”
pylint/checkers/variables.py 97.24% <100.00%> (+<0.01%) ⬆️

@github-actions

This comment has been minimized.

@Pierre-Sassoulas Pierre-Sassoulas added the False Negative πŸ¦‹ No message is emitted but something is wrong with the code label May 14, 2023
@github-actions

This comment has been minimized.

@Pierre-Sassoulas Pierre-Sassoulas added this to the 3.0.0a7 milestone May 14, 2023
@jacobtylerwalls jacobtylerwalls added Unreleased Skip news πŸ”‡ This change does not require a changelog entry labels May 14, 2023
Copy link
Member

@jacobtylerwalls jacobtylerwalls left a comment

Choose a reason for hiding this comment

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

Great, thank you for contributing a fix before 3.0 was released!

@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 3bc94ee

@jacobtylerwalls jacobtylerwalls merged commit 2c9d585 into pylint-dev:main May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False Negative πŸ¦‹ No message is emitted but something is wrong with the code Skip news πŸ”‡ This change does not require a changelog entry Unreleased
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unused-variable false negative on a caught exception in the latest 3.x alpha release
3 participants