Skip to content

Handle the edge case where an f-string looks like f"#{some_var}" - #808

Open
rlbr wants to merge 2 commits into
python-rope:masterfrom
rlbr:master
Open

rlbr wants to merge 2 commits into
python-rope:masterfrom
rlbr:master

Conversation

@rlbr

@rlbr rlbr commented Dec 2, 2024 •

Copy link
Copy Markdown

Description

Fixes broken behavior with specific f-strings

Fixes #807

@rlbr rlbr changed the title Added test with fstring Handle the edge case where an f-string looks like f"#{some_var}" Dec 3, 2024
@rlbr

rlbr commented Dec 3, 2024 •

Copy link
Copy Markdown
Author

All tests passed on my machine

marlon-costa-dc added a commit to marlon-costa-dc/rope that referenced this pull request Sep 25, 2026
Fork of upstream 1.14.0 with the datacosmos integration: PEP 695 type
parameters, full signature tokens, f-string delimiter fixes and the
adopted upstream PRs python-rope#808, python-rope#837, python-rope#858, python-rope#865, python-rope#867, python-rope#868, python-rope#874, python-rope#880.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lieryan lieryan added the patchedast-string Issues related to patchedast when parsing string syntax. label Sep 30, 2026
@lieryan lieryan added this to the 1.16.0 milestone Sep 30, 2026
@lieryan lieryan removed the patchedast-string Issues related to patchedast when parsing string syntax. label Sep 30, 2026
@mcepl

mcepl commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Rebased onto current master (ff8a306) so that CI runs on it and it can be merged cleanly; the actual change is bit-for-bit the same as before. ropetest/refactor passes locally (986 passed, 7 skipped, 1 xfailed).

Apologies for rewriting your fork's master in the process — if you ever need the previous state back, the old head was 23c8a17b2c8d0ef9c4de3050efd0f5acefb9c5f5 (git fetch <upstream> && git reset --hard 23c8a17b).

@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.45%. Comparing base (ff8a306) to head (98257a1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #808   +/-   ##
=======================================
  Coverage   95.44%   95.45%           
=======================================
  Files         134      134           
  Lines       26910    26931   +21     
=======================================
+ Hits        25685    25706   +21     
  Misses       1225     1225           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Rope exception when f-string has a # before a variable when using extract method

3 participants