-
-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rewrite six.moves.range #494
Conversation
there's quite a few more that should get handled probably: https://github.com/asottile/reorder_python_imports/blob/006b2ee37e304bdcb7b3c7ea6a0b1079c9cf999e/reorder_python_imports.py#L651-L728 |
I'm not sure I see how - those in Line 414 in ca5d7df
and those in six.moves.BaseHTTPServer to
because that would require |
70c3447
to
ef63665
Compare
ah I guess I misunderstood what this PR was aiming at, the |
pyupgrade/_plugins/six_moves.py
Outdated
NAMES = { | ||
'range': 'range', | ||
'xrange': 'range', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since they're currently always range
-- this can just be inlined as 'range'
right?
pyupgrade/_plugins/six_moves.py
Outdated
@@ -0,0 +1,53 @@ | |||
import ast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this get added to the existing six
module ?
ah, so to rewrite e.g.
to
? Sure, sounds good, I'll try that in a separate PR (and'll update this one later) |
yep! though actually the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hyped for Monday already |
Just to clarify - would this just be a duplication of what |
for the most part, yeah |
closes #340