We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
env.list
When MY_ENV_VAR is not defined,
MY_ENV_VAR
env.int("MY_ENV_VAR", default=None)
returns None (as expected), but:
None
env.list("MY_ENV_VAR", subcast=str, default=None)
yields the following Exception:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.10/site-packages/environs/__init__.py", line 122, in method value = preprocess(value, **preprocess_kwargs) File "/usr/local/lib/python3.10/site-packages/environs/__init__.py", line 206, in _preprocess_list return typing.cast(str, value).split(delimiter) if value != "" else [] AttributeError: 'NoneType' object has no attribute 'split'
I believe the second example should return None as well.
Thoughts?
The text was updated successfully, but these errors were encountered:
thanks for reporting this! this is fixed in #316
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
When
MY_ENV_VAR
is not defined,returns
None
(as expected), but:yields the following Exception:
I believe the second example should return
None
as well.Thoughts?
The text was updated successfully, but these errors were encountered: