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

raise(T(y)) removes argument #186

Closed asottile closed 5 years ago

asottile commented 5 years ago

I agree this code is weird, but it still shouldn't break this:

def f():
    x = 'hi'
    raise(AttributeError(hi))
--- t.py    (original)
+++ t.py    (refactored)
@@ -1,3 +1,3 @@
 def f():
     x = 'hi'
-    raise(AttributeError(hi))
+    raise AttributeError
asottile commented 5 years ago

dupe of #180