Deleting the last key under a dotted key in an inline table produces invalid TOML
Mantenedores costumam responder em até 2 dias
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 62/100
Direção de pesquisa
Start by running the reproduction in the issue: tomlkit.parse on an inline table with a dotted key, then del of the inner key, then tomlkit.dumps, and check the result with tomllib.loads. The payload does not name the source file, so find where deletion from an inline table removes the item and its separating comma. Done when the output parses as valid TOML, keeps b as an empty inline table in the middle case, and the leading, trailing and sole-key cases also produce valid output.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
d = tomlkit.parse('t = {a="", b.c=1, d=1}\n'); del d["t"]["b"]["c"]; tomlkit.dumps(d) returns 't = {a="", , d=1}\n'.
tomllib.loads rejects that output ("Invalid initial character for a key part"). Expected valid TOML that still holds b as an empty table, e.g. t = {a="", b = {}, d=1}.
If b.c is the last key you get a trailing comma ({a = 1, }), if it is the first a leading one ({, a = 1}), and if it is the only key the output is {} and b is gone.
- Linguagem predominante
- Python
- Estrelas
- 862
- Forks
- 193
- Merge médio
- 4d 2h
- PRs com merge (30d)
- 25
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de python-poetry/tomlkit
-
Speed up array appendsTalvez já em andamento @harshitgupta31415 assumiu há 1 dia. Aberta
Dificuldade 4/5 1-2 dias Facilidade para iniciantes 42/100
python-poetry/tomlkit#665 ·
Mantenedores costumam responder em até 2 dias
-
AttributeError on an out-of-order table under an indented header (4+ levels)Talvez já em andamento @cig13zs assumiu há 1 dia. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 18/100
python-poetry/tomlkit#661 ·
Mantenedores costumam responder em até 2 dias
-
Regression: impossible to dump multiline strings with leading newlineTalvez já em andamento @shivampwm2020 assumiu há 2 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 25/100
python-poetry/tomlkit#655 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
In-place array repetition changes values without updating serialized TOMLTalvez já em andamento @harbinresearcher assumiu há 4 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
python-poetry/tomlkit#646 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
tomlkit 0.15.1 fails on out-of-order table headerTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 45/100
python-poetry/tomlkit#632 ·
Mantenedores costumam responder em até 2 dias
Todas as issues de python-poetry/tomlkit
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
UKGovernmentBEIS/control-arena#917 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
debpalash/VoiceStudio#2937 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
aws-samples/sample-per-model-bedrock#261 ·
Mantenedores costumam responder em até 1 dia