theskumar / theskumar/python-dotenv

set_key creates orphan .env file

オープン
#480 コメント 0 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
8.9k
フォーク
581
PR マージ指標
30日以内にマージされた PR はありません

説明

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("")

https://github.com/theskumar/python-dotenv/blob/3ffcef60d10813b72ecf85d5941d51b0207cd40e/src/dotenv/main.py#L134

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
tooling
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。