-
Notifications
You must be signed in to change notification settings - Fork 164
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
Eliminate the clash between rope.base.ast and python's ast module #570
Comments
I think we'll still need Everything that That said, the rope should never use stdlib's One of the long-standing issue with rope is that because it uses stdlib
Then I'd really want to switch rope to that There used to be |
@lieryan I'm not convinced. I never like complicating code on the off chance that it may change later :-) The proposed PR would not be very large. Any later revision would have similar size.
Leo has such a module for the Qt library. It's ugly, but it's mine :-) In other words, I can enhance it or fix bugs in it immediately.
|
@lieryan Most importantly: once |
@lieryan I am going to start working on the PR. Sometimes it's best to let the code do the talking. |
I am going to close this discussion in favor of discussions in PR #632. |
See PR #579.
Background
None of these three functions appear in Python's ast module.
Proposal
It should be straightforward and safe to do the following:
As a happy side effect, this will eliminate
from ast import *
from Rope's codebase.rope.base.astutils
instead ofrope.base.ast
everywhere.ast
module as needed, including in astutils.py.astutils
qualifier, except within astutils itself.Rationale
ast
will always mean Python'sast
module.parse
andwalk
refer to the functions inastutils
.Update: The new code revealed that _search_in_f_string In rope/refactor/occurrences.py calls the "real" ast.parse and ast.walk functions.
The text was updated successfully, but these errors were encountered: