theskumar / theskumar/python-dotenv
set_key creates orphan .env file
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 8.9k
- Forks
- 581
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
set_key states "If the .env path given doesn't exist, fails instead of risking creating an orphan .env somewhere in the filesystem".
set_key has no check if the file exists. As it uses rewrite which if path passed is not a file, it creates an empty file.
if not os.path.isfile(path):
with open(path, mode="w", encoding=encoding) as source:
source.write("")
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Start with set_key and rewrite in src/dotenv/main.py, especially the file-existence behavior described in the issue. Reproduce set_key with a nonexistent .env path and inspect the related tests or test entry points. Done means a missing path fails without creating an orphan file, while existing-file behavior remains intact.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 48/100