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

Fix conditional sections failing when using command line arguments #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vamshichowdary
Copy link

Fixes bug when arguments are given with command line arguments when conditional sections are enabled.

When param.section.is_enabled is being checked in config.augment_argparse() the sections have not yet been initialized and so all the conditional sections will fail the check even if the conditions are true, when the parameters are passed through command line arguments. Check for conditional section is already being done in config.__getitem__() when config.collect() is called. So no need to check it in config.augment_argparse().

…onditional sections are enabled

Fixes bug when arguments are given with command line arguments when conditional sections are enabled.

When `param.section.is_enabled` is being checked in `config.augment_argparse()` the sections have not yet been initialized and so all the conditional sections will fail the check even if the conditions are true, when the parameters are passed through command line arguments.
Check for conditional section is already being done in `config.__getitem__()` when `config.collect()` is called. So no need to check it in `config.augment_argparse()`.
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

Successfully merging this pull request may close these issues.

1 participant