In-place array repetition changes values without updating serialized TOML
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
Start with the array's in-place repetition behavior and the existing clear() and extend() paths mentioned in the issue. Add tests for a *= 0, a *= 2, and negative repetition that compare the array values, serialized TOML, and a subsequent mutation. Done means all three stay synchronized; the issue links open pull request #647, so check its status before starting.
索引モデルが issue の本文から書いたものです。
説明
On current master (858186a3), in-place array repetition changes the Python list but leaves the serialized TOML unchanged:
import tomlkit
doc = tomlkit.parse("a = [1, 2]\n")
a = doc["a"]
a *= 0
assert a == []
print(tomlkit.dumps(doc)) # still a = [1, 2]
With a *= 2, the values become [1, 2, 1, 2], but the document still serializes [1, 2]. Negative repetition similarly clears the list without clearing the rendered values. The array remains the same object attached to the document.
I plan to synchronize this existing list operation by using the array's current clear() / extend() paths, with tests that compare values, serialization and subsequent mutation. This does not change sorting/reordering behavior discussed in #233.
Prepared with AI assistance. I found no repetition-related issue or PR; please flag any overlapping work.
- 主要言語
- Python
- スター
- 862
- フォーク
- 193
- 平均マージ
- 4日 2時間
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-poetry/tomlkit のほかの issue
-
Speed up array appends対応中かも @harshitgupta31415 が 1 日前に担当しました。 オープン
難易度 4/5 1〜2日 初心者へのやさしさ 42/100
python-poetry/tomlkit#665 ·
メンテナーはふだん 2 日以内に返信
-
Deleting the last key under a dotted key in an inline table produces invalid TOML対応中かも @cig13zs が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
python-poetry/tomlkit#662 ·
メンテナーはふだん 2 日以内に返信
-
AttributeError on an out-of-order table under an indented header (4+ levels)対応中かも @cig13zs が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 18/100
python-poetry/tomlkit#661 ·
メンテナーはふだん 2 日以内に返信
-
Regression: impossible to dump multiline strings with leading newline対応中かも @shivampwm2020 が 2 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
python-poetry/tomlkit#655 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
tomlkit 0.15.1 fails on out-of-order table header再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
python-poetry/tomlkit#632 ·
メンテナーはふだん 2 日以内に返信
python-poetry/tomlkit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
UKGovernmentBEIS/control-arena#917 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
debpalash/VoiceStudio#2937 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
aws-samples/sample-per-model-bedrock#261 ·
メンテナーはふだん 1 日以内に返信