simplify.real_code blanks t-strings, so renames inside them edit the wrong offset
Maintainers usually reply within 7 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
Research direction
Start by reading simplify.real_code and get_any_string_pattern, which the issue identifies as the places that blank string contents and match string prefixes. Check how f-strings are handled, then reproduce the reported rename in the issue on Python 3.14. Done means t-strings preserve their interpolation text during renaming and the result no longer changes {a} to {ab}.
Written by the indexing model from the issue text.
Description
simplify.real_code replaces the text of every string except f-strings ("f" in prefix), and
get_any_string_pattern's prefix [bBfFrRuU]{,4} has no t. On Python 3.14 a t-string's interpolations are
therefore blanked, and renaming a in def h():\n a = 1\n f(t"{a}(", ")") gives t"{ab}(". Accepting
t in the prefix and keeping t-strings' text like f-strings' fixes it.
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 197
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from python-rope/rope
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
python-rope/rope#927 ·
Maintainers usually reply within 7 days
-
Extract raises IndexError or ModuleSyntaxError instead of RefactoringError for an empty or whitespace-only regionPossibly taken @aliassar claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
python-rope/rope#926 ·
Maintainers usually reply within 7 days
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
python-rope/rope#925 ·
Maintainers usually reply within 7 days
-
Extract method/variable and introduce parameter don't check whether the new name is already in useOpen
Difficulty 3/5 1-2 days Newbie friendliness 62/100
python-rope/rope#924 ·
Maintainers usually reply within 7 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
python-rope/rope#923 ·
Maintainers usually reply within 7 days
All issues in python-rope/rope
Similar issues
-
Server mode OAuth2: 'NoneType' object is not subscriptable on every request after re-submitting the OAuth2 login while already logged inPossibly taken @Rarasinhoo claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
pgadmin-org/pgadmin4#10733 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aws-samples/sample-per-model-bedrock#752 ·
Maintainers usually reply within 1 day
-
lesson-submission pending-review
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Ikalus1988/MisakaNet#4452 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OCHA-DAP/topo-tools#250 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day