-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
Forbid explicit step in slice #1071
Comments
I would like to prepare some PR adding visitor and violation for that, but after doing quick experiments, I concluded that for 1st and 2nd case the AST looks identical (I have checked it on python 3.7.4), so probably the only way to implement this violation is to use Also I am not sure about the last example, because it will work only with |
Let's for the beginning cover remaining cases. It's better than nothing.
So, why could we want to use
As you said, we can't say the difference between |
True, it doesn't make much sense when we are talking about immutable objects, I just wanted to give some example that
If we decide to write token visitor instead of AST, it will be possible to distinguish cases like 1st and 2nd ones, but I need to do some research and experiments to fully confirm that. |
In case we cannot work with |
I have checked if it's possible to implement this violation with |
When do you plan to merge #1147 to |
@skarzi after |
Rule request
Thesis
Case with
a[::]
will be covered in #1011Reasoning
Consistency
The text was updated successfully, but these errors were encountered: