Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Make
used-before-assignment
consider classes in method annotation and defaults #5184Make
used-before-assignment
consider classes in method annotation and defaults #5184Changes from 6 commits
0f87c0e
c45d82e
8e6cd18
63e34c0
f7333e2
3d7d5d3
8a3e33f
46c21e3
645b2c7
9b76224
6b9a024
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This for loop spanning 200 lines asks for a refactor. Maybe you have an idea on how we could simplify this ? I'm not saying we should refactor it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's awful. I don't even understand half of what it is doing and variable names such as
maybee0601
really don't help.One of the problems is that it is doing something with
consuming
variables in different scopes which I don't really understand. We can probably investigate this at some point.I'm just going through the open issues for
undefined-variable
as it seemed like a good addition to2.12
to improve that checker. For now I tend to add new single-purposemethods
andelifs
, that should help refactoring later.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see I'm not the only one 😄 Yes the consuming + continue + break makes the refactor quite hard. Also it's really hard to understand what's happening, good job fixing issues despite that 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The complete
visit_name
function has just gotten too complicated. Not sure we'll ever be able to fix it though. It's really easy to break things if something goes wrong during the refactor. Lot's of testing needed before then.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is also because the way consumption works is quite difficult to understand. It took me a while to understand how the actual looping over scopes works. If we were to improve that (or it explanation) I think we would already be in a much better place.