We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When hasattr() function is called on a DotMap instance (config in this case) regarding a non existing attribute, it is automatically created.
E.g. Let's say 'config' is a DotMap instance which does not have 'testAttr' as an attribute. It will be created after a hasattr() function call.
Convert DotMap instance to dict and then call hasattr, self.config.toDict().
self.config.toDict()
or
replace hasattr() function with attr in self.config
hasattr()
attr in self.config
I will open a pull request with my proposed solution tomorrow. 😃
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue
When hasattr() function is called on a DotMap instance (config in this case) regarding a non existing attribute, it is automatically created.
E.g. Let's say 'config' is a DotMap instance which does not have 'testAttr' as an attribute. It will be created after a hasattr() function call.
Solution
Convert DotMap instance to dict and then call hasattr,
self.config.toDict()
.or
replace
hasattr()
function withattr in self.config
I will open a pull request with my proposed solution tomorrow. 😃
The text was updated successfully, but these errors were encountered: