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

Detect mismatched default data type #382

Open
jayvdb opened this issue Apr 19, 2022 · 1 comment
Open

Detect mismatched default data type #382

jayvdb opened this issue Apr 19, 2022 · 1 comment

Comments

@jayvdb
Copy link

jayvdb commented Apr 19, 2022

The following does not raise an error:

SECRET_KEY = env.bool('SECRET_KEY', 'some random key')

SECRET_KEY will be the default value of type str.

When someone tries to override the default, it will break.

@jayvdb
Copy link
Author

jayvdb commented Apr 19, 2022

I notice that get_value (and __call__) has an argument parse_default=False - switching this to default to True may solve the problem.

However, that caused the tests for bytes() to fail, and one other odd error in test_schema. I'll play around with these first.

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

No branches or pull requests

1 participant