mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 07:35:08 +02:00
Remove duplicate getattr call in entity wrap_attr (#118558)
This commit is contained in:
@@ -365,7 +365,7 @@ class CachedProperties(type):
|
||||
attr = getattr(cls, attr_name)
|
||||
if isinstance(attr, (FunctionType, property)):
|
||||
raise TypeError(f"Can't override {attr_name} in subclass")
|
||||
setattr(cls, private_attr_name, getattr(cls, attr_name))
|
||||
setattr(cls, private_attr_name, attr)
|
||||
annotations = cls.__annotations__
|
||||
if attr_name in annotations:
|
||||
annotations[private_attr_name] = annotations.pop(attr_name)
|
||||
|
Reference in New Issue
Block a user