Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong type annotations #517

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oliversen
Copy link

No description provided.

@Matoran
Copy link

Matoran commented May 13, 2024

They are correct you can use dotenv_path or stream to create a dotenv (which make both optionals). Encoding is also optional for tempfile https://docs.python.org/3/library/tempfile.html.

@oliversen
Copy link
Author

If the Optional type is specified, then we must set the default value for the parameter. In this case, it is necessary to rewrite further code.
Correctly dotenv_path: StrPath or dotenv_path: Optional[StrPath] = None

@Matoran
Copy link

Matoran commented May 16, 2024

I agree with dotenv_path: Optional[StrPath] = None, the DotEnv object is build on load_dotenv which first arg is dotenv_path: Optional[StrPath] = None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants