You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix type hint for dotenv_path var, add StrPath alias (#432)
* Fix type hint for load_dotenv
Fixes#431
* Quote type hints to avoid runtime errors in earlier Python versions
* Revise type of dotenv_path parameter
Based on PR feedback and typeshed's type hint for the built-in open()
function:
https://github.com/python/typeshed/blob/e2d67bf7034f68c07bd35150247e58e0817725d9/stdlib/builtins.pyi#L1421
* Allow only string paths, not byte paths
These paths can flow into `shutil.move`, which does not accept byte
paths or (int) file descriptors. See python/typeshed#6832
* Create a type alias for the paths this library accepts
And use it consistently in main.py.
0 commit comments