The following case:
test = 1
test3 = 3
test = test * 2 * test3 * 4
96
is probably safe as:
test = 1
test3 = 3
test *= 2 * test3 * 4
96
or am I missing something?
Similarly for concatenation (which is non-commutative, but associative), seems fine here:
test = "1"
test3 = "3"
test = test + "2" + test3 + "4"
'1234'
test = "1"
test3 = "3"
test += "2" + test3 + "4"
'1234'
Example of an operator where this doesn't work (division):
test = 1
test3 = 3
test = test / 2 / test3 / 4
0.041666666666666664
test = 1
test3 = 3
test /= 2 / test3 / 4
6.0
(also just for fun, / is technically a concatenation operator for Path, but that'd require checking for the type)
ruff version 0.4.7
The following case:
is probably safe as:
or am I missing something?
Similarly for concatenation (which is non-commutative, but associative), seems fine here:
Example of an operator where this doesn't work (division):
(also just for fun,
/is technically a concatenation operator forPath, but that'd require checking for the type)ruff version 0.4.7