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: The rule is too greedy and will happily trigger in code that has nothing to do with the supposed suggested simplification in the documentation
container must be accessed in both the condition with the form key in container and then the if block container[key]
key must be reused both in the condition and if block
"value" must be a literal or simple variable name e.g. "value" or value. Else, stuff like value.property or value() can have side-effects which change the state of the application.
The text was updated successfully, but these errors were encountered:
Desired change
Example
This testcase shows the false posivie
Output
Issues with the rule
container_1
is not a dict, could be any generic containerSuggestion
The rule should only trigger in the very strict case
Where
container
must be accessed in both the condition with the formkey in container
and then the if blockcontainer[key]
key
must be reused both in the condition and if block"value"
must be a literal or simple variable name e.g."value"
orvalue
. Else, stuff likevalue.property
orvalue()
can have side-effects which change the state of the application.The text was updated successfully, but these errors were encountered: