Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

fix: apply expanduser to dotenv_path#615

Open
veeceey wants to merge 1 commit intotheskumar:mainfrom
veeceey:fix/issue-525-expanduser
Open

fix: apply expanduser to dotenv_path#615
veeceey wants to merge 1 commit intotheskumar:mainfrom
veeceey:fix/issue-525-expanduser

Conversation

@veeceey
Copy link

Summary

  • Applyos.path.expanduser() (forstr paths) andPath.expanduser() (forPath objects) todotenv_path so that~ is properly expanded to the user's home directory
  • The fix preserves the original type:str inputs remainstr,Path inputs remainPath
  • Applied inDotEnv.__init__,set_key(), andunset_key() — all places wheredotenv_path is used directly

Fixes#525

Test plan

  • All 106 existing tests intest_main.py pass with no modifications
  • Verified thatdotenv_path="~/.env" correctly expands to the full home directory path
  • Verified thatPath("~/.env") correctly expands viaPath.expanduser()
  • Verified that paths without~ are unchanged
  • Verified thatNone is handled correctly (no expansion attempted)

Apply os.path.expanduser() / Path.expanduser() to dotenv_path so that~ is properly expanded to the user's home directory. The fix preservesthe original type (str stays str, Path stays Path) and is applied inDotEnv.__init__, set_key, and unset_key.
@veeceey
Copy link
Author

Friendly ping - any chance someone could take a look at this when they get a chance? Happy to make any changes if needed.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

support expanduser() for dotenv_path

1 participant

@veeceey

[8]ページ先頭

©2009-2026 Movatter.jp