-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add items iterator #38
Conversation
if not overwrite: | ||
overlap = set(cls.__dict__.keys()) & set(to_include.keys()) | ||
if overlap: | ||
raise ValueError("Configuration clashes detected: {}".format(overlap)) | ||
|
||
own_prefix = _normalized(getattr(cls, "__prefix__", "")) | ||
|
||
if namespace is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if own_prefix: | ||
v._full_name = f"{own_prefix}_{v._full_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Code Quality Violation
too many nesting levels (...read more)
Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.
Learn More
if isinstance(v, EnvVariable): | ||
v._full_name = f"{own_prefix}_{v._full_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Code Quality Violation
too many nesting levels (...read more)
Avoid to nest too many loops together. Having too many loops make your code harder to understand.
Prefer to organize your code in functions and unit of code you can clearly understand.
Learn More
We extend the public API with an iterator that allows retrieving all the configuration items. This returns a mapping between attribute paths and environment variable instances. We also attach the full variable name to each EnvVariable instance, which is accessible via the ``full_name`` property.
71d0edf
to
fd66b90
Compare
We extend the public API with an iterator that allows retrieving all the configuration items. This returns a mapping between attribute paths and environment variable instances. We also attach the full variable name to each EnvVariable instance, which is accessible via the
full_name
property.