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

Cleanup variables checker #9978

Merged
merged 4 commits into from
Sep 29, 2024

Conversation

nickdrozd
Copy link
Collaborator

Type of Changes

Type
βœ“ πŸ”¨ Refactoring

Description

The variables checker contains some really complicated code (complicated in a bad way). It is difficult to understand and therefore difficult to modify. I became keenly aware of this over the course of several failed attempts to implement #9964. The complicatedness of this code may also account for why #8893 remains open.

This MR makes a few minor changes in the direction of cleaning up the variables checker. It should make no functional difference.

There are more changes that need to be made, but it preferable that MRs be small. So this is the first of several.

Each commit makes one specific change, so the commits should be reviewed one at a time.

@nickdrozd nickdrozd added the Skip news πŸ”‡ This change does not require a changelog entry label Sep 27, 2024
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

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

Project coverage is 95.80%. Comparing base (8630cfd) to head (208b434).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #9978      +/-   ##
==========================================
- Coverage   95.80%   95.80%   -0.01%     
==========================================
  Files         174      174              
  Lines       18940    18934       -6     
==========================================
- Hits        18146    18140       -6     
  Misses        794      794              
Files with missing lines Coverage Ξ”
pylint/checkers/variables.py 97.22% <100.00%> (-0.02%) ⬇️

Copy link
Contributor

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

This comment was generated for commit 208b434

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.

Thanks! Reducing complexity debt in the variables checker is important. I've contributed at least a dozen times and still find it forbidding.

@jacobtylerwalls jacobtylerwalls merged commit c0ecd70 into pylint-dev:main Sep 29, 2024
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip news πŸ”‡ This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants