-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: Add several configuration related fixes (#583)
Fixes #582 This makes the attributes of the configuration object case sensitive in order to match better the environment variables that are too. This makes the attributes of the configuration object accept any legal Python variable name (Configuration().some_2_attribute) is valid now. This makes non-defined attributes return None when queried instead of raising an AttributeError. This makes it easier to use the configuration object because the user won't have to check for the existence of the attribute beforehand: if Configuration().some_attribute == "value": # do stuff instead of if hasattr(Configuration(), "some_attribute") and Configuration().some_attribute == "value": # do stuff
- Loading branch information
Showing
2 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters