theskumar / theskumar/python-dotenv
Do you plan to call os.path.expandvars?
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 8.9k
- フォーク
- 581
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I request to be able to fill in the environment variable name by calling os.path.environmentvars when setting the value in main.py#L98.
An environment variable name is, for example, %TEMP% (in Windows).
[.env]
LOG_DIR=%TEMP%\log
If possible, it would be nice if it could be called recursively. os.path.expandvars will only expand the environment variable name once.
def expandvarsRecursive(value):.
expanded = os.path.expandvars(value)
return value if expanded == value else expandvarsRecursive(expanded)
The reason for this is that if it is called recursively, we don't have to keep track of the same values.
[.env]
PROJECT_HOME=C:\project
LOG_DIR=%PROJECT_HOME%\log
TRACE_LOG_DIR=%LOG_DIR%\trace
Please consider this.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Start in src/dotenv/main.py around line 98 and trace how values from .env files are expanded. Check how Windows-style variables and recursive references should behave, then verify the LOG_DIR and TRACE_LOG_DIR examples resolve as requested. No linked tests or further maintainer guidance are provided.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100