You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pylint shows an error when setting an attribute to a class with setattr
we use .add_file on hrt.Folder which dynamically sets attributes. Resulting in lots of linting errors.
This solution does not work as it introduces other errors. When accessing an unknown attribute it should still raise an error.
def__getattr__(self, name):
"""Ignore pylint errors that attributs set with setattr are __getattr__ will only get called for undefined attributes. Idea from: https://stackoverflow.com/questions/35990313/avoid-pylint-warning-e1101-instance-of-has-no-member-for-class-with-dyn FIXME: disabled because it breaks code hints (ctrl+space) """warnings.warn(f"No member {name} contained in {self.__class__.__name__}.")
return""
The text was updated successfully, but these errors were encountered:
pylint shows an error when setting an attribute to a class with
setattr
we use .add_file on hrt.Folder which dynamically sets attributes. Resulting in lots of linting errors.
This solution does not work as it introduces other errors. When accessing an unknown attribute it should still raise an error.
The text was updated successfully, but these errors were encountered: