PyCQA / modernize

Modernizes Python code for eventual Python 3 migration. Built on top of fissix (a fork of lib2to3)
https://modernize.readthedocs.org/
Other
355 stars 51 forks source link

rewrite of maxsize / maxint breaks code #185

Closed asottile closed 2 years ago

asottile commented 5 years ago

contrived example:

from sys import maxint
print(maxint)
RefactoringTool: Refactored t.py
--- t.py    (original)
+++ t.py    (refactored)
@@ -1,3 +1,5 @@
-from sys import maxint
+from __future__ import absolute_import
+from __future__ import print_function
+from sys import maxsize

 print(maxint)

it didn't rewrite the reference to maxint