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

Make the Environment module fully type safe #14247

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dcbaker
Copy link
Member

@dcbaker dcbaker commented Feb 12, 2025

Not too much here, mostly just asserts because of potentially code returning unions where we have a pretty good idea of what the type is.

These include things like not narrowing unions and boolean error
handling
We don't actually allow anything except elementry types (`str`, `bool`,
`int`, `array[str]`) here, so we can tighten the typing. This in turn
helps us to simplify the typing in environment.py
This as much as anything is to stop lying to envconfig about the
potential types it will be given.
@dcbaker dcbaker added the typing label Feb 12, 2025
@dcbaker dcbaker requested a review from jpakkane as a code owner February 12, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants