simplify.real_code blanks t-strings, so renames inside them edit the wrong offset
维护者通常 7 天内回复
评估
调研方向
首先阅读 simplify.real_code 和 get_any_string_pattern,issue 指出这两处会清空字符串内容并匹配字符串前缀。检查 f-string 的处理方式,然后在 Python 3.14 上重现 issue 中报告的重命名问题。完成标准是:t-string 在重命名时保留其插值文本,并且结果不再将 {a} 改成 {ab}。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 2.2k
- 派生
- 197
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-rope/rope 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 88/100
python-rope/rope#927 ·
维护者通常 7 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
python-rope/rope#926 ·
维护者通常 7 天内回复
-
难度 4/5 3-5 天 新手友好度 30/100
python-rope/rope#925 ·
维护者通常 7 天内回复
-
Extract method/variable and introduce parameter don't check whether the new name is already in use未关闭
难度 3/5 1-2 天 新手友好度 62/100
python-rope/rope#924 ·
维护者通常 7 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
python-rope/rope#923 ·
维护者通常 7 天内回复
相似的 Issue
-
ci-rerun: collect.py fails a whole pr-babysit cycle on one transient GitHub 5xx and never retries未关闭follow-up
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
-
Built-in QUBO fallback applies bitwise xor to floating binary states可能已有人在做 @iloveeyjafjalla 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
qboson/kaiwu-pytorch-plugin#1702 ·
维护者通常 3 天内回复
-
bug v2
难度 2/5 1-3 小时 新手友好度 76/100
modelcontextprotocol/python-sdk#3811 ·
维护者通常 1 天内回复
-
cost:cheap practicality:seen-in-the-wild severity:medium
难度 2/5 1-3 小时 新手友好度 72/100
fairagro/m4.2_advanced_middleware_api#620 ·
维护者通常 1 天内回复