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

Example with ENV_IGNORE_ERRORS doesnt work #7

Open
alex-ong opened this issue Jul 28, 2023 · 1 comment
Open

Example with ENV_IGNORE_ERRORS doesnt work #7

alex-ong opened this issue Jul 28, 2023 · 1 comment

Comments

@alex-ong
Copy link

from envclasses import EnvClassMeta
import envclasses


class MyConfig(metaclass=EnvClassMeta):
    test_var: int


envclasses.os.environ["ENV_IGNORE_ERRORS"] = "yes"
envclasses.os.environ["PYENV_CLASS_REFRESH_LOAD"] = "yes"
config = MyConfig()

print(config.test_var)
config.test_var = 100
print(config.test_var)

results in:

line 38, in post_init
    raise RuntimeError(F'The following environment variables are undefined: {", ".join(errors)}')
RuntimeError: The following environment variables are undefined: TEST_VAR

it doesn't seem like setting the ENV_IGNORE_ERRORS is working correctly

@alex-ong
Copy link
Author

alex-ong commented Jul 28, 2023

Just realised its because that functionality hasn't been released.
Could you release 0.1.3?

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