Skip to content

PR: Rename rope.base.ast.parse to rope_parse#635

Closed
edreamleo wants to merge 2 commits intopython-rope:masterfrom
edreamleo:ekr-remove-ast-qualifications
Closed

PR: Rename rope.base.ast.parse to rope_parse#635
edreamleo wants to merge 2 commits intopython-rope:masterfrom
edreamleo:ekr-remove-ast-qualifications

Conversation

@edreamleo
Copy link
Contributor

@edreamleo edreamleo commented Jan 3, 2023

A PR designed to reduce diffs in PR #632.

  • Rename rope.base.ast.parse to rope_parse, adding from rope.base.ast import rope_parse as needed.
  • Add comment in rope.refactor.extract._parse_text that ast.parse refers to stdlib.ast.parse.
  • Add comment about call_for_nodes in rope.refactor.patchedast.
    If accepted, PR PR: eliminate call_for_nodes #633 will eliminate call_for_nodes entirely.

Pitch

  • Removes any possibility of confusion between stdlib.ast.parse and rope.base.ast.parse.
  • Removes unnecessary qualifications for rope_parse.
  • Prepares for another PR that will remove unnecessary qualifications for RopeNodeVisitor.
  • Will reduce diffs in PR PR: Remove from ast import * from rope.base.ast #632.

@lieryan
Copy link
Member

lieryan commented Jan 3, 2023

This change just making the code more confusing. The purpose of rope.base.ast.parse() being named identically to ast.parse() is because there is zero reason for any of rope's code to use the standard library version in rope's codebase. rope.base.ast backports changes from future standard library ast; and it may also add some code that are useful for rope. It is intended to be a drop-in replacement of the standard library ast.

You seem to have a rather unhealthy obsession with the rope.base.ast module for some reason, can I ask you to move away from ast module for now and look for something other areas to improve on. These PRs trying to make it into what it isn't are counter-productive and aren't really moving the codebase towards the direction that we needed/wanted.

@lieryan lieryan closed this Jan 3, 2023
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.

2 participants