Skip to content
Snippets Groups Projects
Commit 97e1096a authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Improve suggestion on variable naming convention to match python's (closes #81)

parent 720c1052
No related branches found
No related tags found
1 merge request!83Improve suggestion on variable naming convention to match python's (closes #81)
Pipeline #
...@@ -267,9 +267,7 @@ def check_config_consumed(config): ...@@ -267,9 +267,7 @@ def check_config_consumed(config):
if not keyword.startswith('_') and not keyword.isupper(): if not keyword.startswith('_') and not keyword.isupper():
attr = getattr(config, keyword) attr = getattr(config, keyword)
if attr is not None and not inspect.isclass(attr) and not inspect.ismodule(attr): if attr is not None and not inspect.isclass(attr) and not inspect.ismodule(attr):
logger.warn("The variable '%s' in a configuration file is not known or not supported; use all " logger.warn("The variable '%s' in a configuration file is not known or not supported by this application; use a '_' prefix to the variable name (e.g., _%s) to suppress this warning", keyword, keyword)
"uppercase variable names (e.g., '%s') to suppress this warning.", keyword,
keyword.upper())
def parse_config_file(parsers, args, args_dictionary, keywords, skips): def parse_config_file(parsers, args, args_dictionary, keywords, skips):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment