Skip to content

fix for issue #815 - #816

Open
sgtBurns7 wants to merge 1 commit into
python-rope:masterfrom
sgtBurns7:fix_815
Open

sgtBurns7 wants to merge 1 commit into
python-rope:masterfrom
sgtBurns7:fix_815

Conversation

@sgtBurns7

Copy link
Copy Markdown

Description

added a fallback strategy to _search_in_f_string in occurences.py allowing for backwards compatibility as the initial parsing method will be the same, added unit test case for the bug provided

Fixes #(issue)

Checklist (delete if not relevant):

  • [Done] I have added tests that prove my fix is effective or that my feature works
  • I have updated CHANGELOG.md
  • I have made corresponding changes to user documentation for new features
  • I have made corresponding changes to library documentation for API changes

@mcepl

mcepl commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

#906 addresses the same f-string occurrence-discovery problem by replacing regex-selected fragment parsing with tokenisation.

I prefer that direction over the textual fallback here. Searching for identifier text after parsing fails can also find names inside literal content, so it needs particular care before Rename or Inline can safely use those offsets.

Could you contribute your nested-quote reproduction as a regression test for #906 and check that it passes there? That PR currently has Python 3.10 and 3.11 CI failures, so it is not yet a replacement we can merge. Please keep this PR open while that compatibility work is resolved.

This branch has not been deployed

No deployments
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