Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Regression: impossible to dump multiline strings with leading newline

Abierto
#655 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

@shivampwm2020 ya está trabajando en esto.

Desde el 14/10/2026.

  • #656 de @shivampwm2020 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python
Área
devtools

Línea de trabajo

Start with the reproduction: tomlkit.string(...) with escape=False passed to tomlkit.dumps, comparing the output with and without the leading newline. The behaviour change came from pull request #551, and open pull request #656 already proposes moving it under the escape flag, so read that diff first. Done means the aligned-strings example dumps without the extra newline, and the maintainers have agreed on the fix since #656 is still open.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Pull request #551 changed the behaviour of raw, non-escaped string values. Running

import tomlkit
s = tomlkit.string(
  "\n  aligned\n  strings\n",
  multiline=True,
  literal=True,
  escape=False,
)
print(tomlkit.dumps(s))

used to output

'''
  aligned
  strings
'''

as expected, but now outputs

'''

  aligned
  strings
'''

(note the extra newline). In fact, it is now impossible to produce the desired output.

Proposed fix: hide the behaviour change of #551 under the escape flag.

Lenguaje dominante
Python
Estrellas
862
Forks
193
Merge medio
4 d 14 h
PR fusionados (30 d)
22

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python-poetry/tomlkit

Todos los issues de python-poetry/tomlkit

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.