simplify.real_code blanks t-strings, so renames inside them edit the wrong offset

オープン 初心者向け
#913 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 7 日以内に返信

@sean0407 がすでに取り組んでいます。

2026年10月24日 から。

  • #915 @sean0407 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
83/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
devtools

調査の方向性

まず 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時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

python-rope/rope のほかの issue

python-rope/rope の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。