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
- 星號
- 867
- 分支
- 220
- 平均合併
- 5 天 58 分鐘
- 30 天內合併 PR
- 32
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
python-poetry/tomlkit 的其他 Issue
-
Emptying a nested array of tables before an out-of-order super-table renders invalid TOML (0.15.2, since #567)可能已有人在做 @ryanchou1994 於 6 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 45/100
python-poetry/tomlkit#690 · 1 則留言 ·
維護者通常 2 天內回覆
-
tomlkit 0.15.1 fails on out-of-order table header可能重新可做 關聯的 PR 已關閉且未合併。 未關閉
難度 4/5 3-5 天 新手友好度 45/100
python-poetry/tomlkit#632 ·
維護者通常 2 天內回覆
-
`dumps(sort_keys=True)` only sorts the top level of a parsed document (nested tables / inline tables / AoT keep original order)可能已有人在做 @Sreekant13 於 40 天前認領。 未關閉
難度 5/5 一週以上 新手友好度 35/100
python-poetry/tomlkit#614 · 2 則留言 ·
維護者通常 2 天內回覆
-
toml-test datetime cases use tomlkit's own parse_rfc3339 as the expected value, so they cannot detect datetime parsing bugs可能已有人在做 @ekanshul 於 31 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 68/100
python-poetry/tomlkit#603 ·
維護者通常 2 天內回覆
-
unwrap raises KeyAlreadyPresent for an out-of-order AoT element extension可能已有人在做 @davidpavlovschi 於 102 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 72/100
python-poetry/tomlkit#577 ·
維護者通常 2 天內回覆
查看 python-poetry/tomlkit 的全部 Issue
相似的 Issue
-
kind/bug priority/medium qa_automation
難度 2/5 1-3 小時 新手友好度 78/100
yugabyte/yugabyte-db#37324 ·
維護者通常 1 天內回覆
-
good first issue
難度 1/5 1 小時以內 新手友好度 87/100
btclib-org/btclib-node#2260 ·
維護者通常 1 天內回覆
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)可能已有人在做 @geyazheng 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
langchain-ai/langchain-aws#1469 ·
維護者通常 1 天內回覆
-
GCToggler leaves collection enabled if the body re-enables it可能已有人在做 @Gambit-Checkmate 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 7 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆