You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjustment: In which way should it/they be adjusted?
Explanation
The SIM904 check currently does not check if previous values were accessed in keys. This means new keys cannot access old keys since the dictionary is not yet constructed.
Why is the adjustment necessary / better?
Example
This is an example where the mentioned rule(s) would currently be suboptimal:
Yes, in this case, it could be written by creating lots of additional variables to replace the references to previous values of "total_time" and "frame_time", but in more complicated dictionaries it seems like this rule could become more troublesome,
The text was updated successfully, but these errors were encountered:
Just in case you missed it : in order to still add new rules quickly and don't disturb users of flake8-simplify, I'll use SIM9 rules. If there are no more false positives for 6 months, I'll change the rule to something not beginning with "9". This way people can ignore the SIM9 rules in their CI and just try them once in a while.
MartinThoma
changed the title
[Adjust Rule] SIM904 false positive (accessing previous dict values)
[SIM904][False-positive] Accessing previous dict values
Feb 16, 2022
Desired change
Explanation
Why is the adjustment necessary / better?
Example
This is an example where the mentioned rule(s) would currently be suboptimal:
or more simply:
Yes, in this case, it could be written by creating lots of additional variables to replace the references to previous values of "total_time" and "frame_time", but in more complicated dictionaries it seems like this rule could become more troublesome,
The text was updated successfully, but these errors were encountered: