-
-
Notifications
You must be signed in to change notification settings - Fork 46
Solving the #noqa : B020 and #noqa : B018 #251
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
base: main
Are you sure you want to change the base?
Conversation
Please:
|
What I have done is -
I have also used
Hence I think there is no issue with the code. |
This does not validate at all that the code is doing the same thing, I'm not sure at all what you considered a useless expression is really useless. And I'm not sure at all renaming the variable comes without side-effects. The only thing you've really validated is the ruff part, i.e. ruff issues are gone. But you could get the same results by deleting the whole codebase, there will be no more code and no more issue. You need to find a test case (manual is fine) where the whole code block is executed, and validate that resulting content is identical before and after your modification. |
I have written this manual test with the exact same code blocks -
|
Thank you for this test file. I'm concerned by the fact that the following code never gets executed in your test case:
It is not executed both in previous and new code, so it either indicate that your test case is incomplete (there are other situations you did not covered) or that this code is simply useless (and should be removed). Can you please have a look into this and advise? I feel like either there is something we still did not properly understood or there is code to clean up. |
Fixes #193