gustaf.helpers.raise_if.invalid_inherited_attr#
- gustaf.helpers.raise_if.invalid_inherited_attr(attr_name, qualname, property_=False)[source]#
Returns a function that would behave the same as given function, but would raise AttributeError. This needs to be defined in class level.
- Parameters:
func ((function)) – _description_
qualname ((class)) – _description_
property ((bool, optional)) – is this function a property?. Defaults to False.
- Returns:
raiser – behaves same as func if property_ is correctly defined
- Return type:
function