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

Refactor of visit_name for variables #5241

Merged
merged 29 commits into from
Dec 2, 2021

Conversation

DanielNoord
Copy link
Collaborator

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Write a good description on what the PR does.

Type of Changes

Type
βœ“ πŸ”¨ Refactoring

Description

@DanielNoord DanielNoord added the Maintenance Discussion or action around maintaining pylint or the dev workflow label Nov 1, 2021
@coveralls
Copy link

coveralls commented Nov 1, 2021

Pull Request Test Coverage Report for Build 1531547014

  • 107 of 110 (97.27%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.002%) to 93.52%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pylint/checkers/variables.py 107 110 97.27%
Files with Coverage Reduction New Missed Lines %
pylint/checkers/variables.py 1 95.49%
Totals Coverage Status
Change from base Build 1520446193: -0.002%
Covered Lines: 14028
Relevant Lines: 15000

πŸ’› - Coveralls

@DanielNoord
Copy link
Collaborator Author

The non-covered lines are already non-covered, see the current main coverage report here:
https://coveralls.io/builds/43915003/source?filename=pylint%2Fcheckers%2Fvariables.py

@cdce8p cdce8p self-requested a review November 1, 2021 17:10
@cdce8p cdce8p added the Needs review πŸ” Needs to be reviewed by one or multiple more persons label Nov 1, 2021
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.

Huge work, and this make this function so much more understandable, thanks πŸ‘

@Pierre-Sassoulas Pierre-Sassoulas self-requested a review November 3, 2021 18:58
@cdce8p
Copy link
Member

cdce8p commented Nov 20, 2021

I still have this one on my todo list. Might take some time though as I'm still working on my astroid PR.

@DanielNoord
Copy link
Collaborator Author

No rush! I think the column PR's are far more important now!

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.

I just realized there's "Submodule flask added at 9486b6" that was added by mistake before primer were introduced.

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.

Could we try to cover the 4 lines that are not covered ? It's line that emit messages, so I think it's important to know if they emit properly or remove them if we can't trigger their messages.

@DanielNoord
Copy link
Collaborator Author

Could we try to cover the 4 lines that are not covered ? It's line that emit messages, so I think it's important to know if they emit properly or remove them if we can't trigger their messages.

The message after elif current_consumer.scope_type == "lambda": was introduced for this issue:
#404 and this commit 5193b7d

I'm not quite sure what it is actually trying to find.

The other one is 05b526d.

I'm really not sure type of variables are being tested here.

@cdce8p
Copy link
Member

cdce8p commented Nov 29, 2021

I still think it would be easier to split this up, but if you prefer it, I can review the rest here too. Just let me know.
I hope to do it later today or tomorrow.

@DanielNoord
Copy link
Collaborator Author

I still think it would be easier to split this up, but if you prefer it, I can review the rest here too. Just let me know.
I hope to do it later today or tomorrow.

Let's do it here as others have also reviewed this too. I'll try and incorporate your review as soon as I get it so @Pierre-Sassoulas can release 2.12.2 πŸ˜„

@Pierre-Sassoulas Pierre-Sassoulas added C: undefined-variable Issues related to 'undefined-variable' check and removed Needs review πŸ” Needs to be reviewed by one or multiple more persons labels Nov 30, 2021
@DanielNoord DanielNoord requested a review from cdce8p December 2, 2021 07:29
Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

This should be the last comment

Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

Really the last one this time πŸ˜…
Thanks @DanielNoord! πŸš€ Lets squash merge it once all tests pass.

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.

This sorely needed a refactor, and it was a huge one. Thank you @DanielNoord and all the reviewers, in particular @jacobtylerwalls sorry for the rebase conflcits it'll cost you :)

@DanielNoord
Copy link
Collaborator Author

@Pierre-Sassoulas want to do a final review? Or is this good to go after CI passes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: undefined-variable Issues related to 'undefined-variable' check Maintenance Discussion or action around maintaining pylint or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants