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
My understanding is that W1619 (old-division) is supposed to check for PEP238 safety, and help users avoid unfortunate surprises when division on integers becomes true division. However, I believe that if the number being divided is a float, PEP238 does not change the division semantics, and therefore the following code (call it repro.py) should run the same in both Python 2 and 3.
My understanding is that W1619 (old-division) is supposed to check for PEP238 safety, and help users avoid unfortunate surprises when division on integers becomes true division. However, I believe that if the number being divided is a float, PEP238 does not change the division semantics, and therefore the following code (call it
repro.py
) should run the same in both Python 2 and 3.Possibly related to #2887 and #2803
Steps to reproduce
repro.py
file described above.pylint --reports=no --disable=all --enable=old-division repro.py
Current behavior
$ pylint --reports=no --disable=all --enable=old-division repro.py ************* Module repro repro.py:1:4: W1619: division w/o __future__ statement (old-division) ----------------------------------- Your code has been rated at 5.00/10
Expected behavior
Since the division is explicitly on a
float
-typed number,pylint
reports no issues.pylint --version output
Both the newest 2.x and the newest 1.x seem to be affected:
The text was updated successfully, but these errors were encountered: