Skip to content

Issue 270 #432

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

Merged
merged 6 commits into from
Oct 31, 2021
Merged

Issue 270 #432

merged 6 commits into from
Oct 31, 2021

Conversation

climbus
Copy link
Contributor

@climbus climbus commented Oct 7, 2021

Description

Quick fix #270

I think it needs some rewriting, but I need some time for investigation.

Checklist (delete if not relevant):

  • I have added tests that prove my fix is effective or that my feature works
  • I have updated CHANGELOG.md

Sorry, something went wrong.

@lieryan lieryan added this to the 0.22.x milestone Oct 30, 2021
@lieryan lieryan merged commit fe9a1e8 into python-rope:master Oct 31, 2021
@lieryan
Copy link
Member

lieryan commented Oct 31, 2021

I'm not quite cozy with how the MINIMAL_LEN_FOR_AS is implemented, feels like there must be a better way, but it seems to work fine. Good enough for the purpose, at least, this Worder module also has other weird issues, so we'll probably need to figure out a better way to re-do this module anyway. Maybe a regex-based approach might work better, or maybe look into existing proper lenient Python code parsing libraries (as different from ast parser, as Worder often need to work on code that aren't syntactically correct as they're being typed).

@climbus
Copy link
Contributor Author

climbus commented Oct 31, 2021

Thanks. I'm not happy with this solution. I planed to think about this one more time. I was wondering if it can be done by ast parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rope sometimes fails to rename imports with "as"
2 participants