Skip to content
New issue

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

Restore __slots__ to core objects #127441

Merged
merged 17 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixups
  • Loading branch information
bdraco committed Oct 3, 2024
commit 8a9c27e54297132f2816ed403bf6dd893c5e12bf
1 change: 1 addition & 0 deletions homeassistant/components/recorder/models/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class LegacyLazyState(State):
"_attributes",
"_last_changed_ts",
"_last_updated_ts",
"_last_reported_ts",
"_context",
"attr_cache",
]
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/template/template_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import logging
from typing import Any

from propcache import cached_property
from propcache import under_cached_property
import voluptuous as vol

from homeassistant.const import (
Expand Down Expand Up @@ -302,7 +302,7 @@ def __init__(self) -> None:
super().__init__("unknown.unknown", STATE_UNKNOWN)
self.entity_id = None # type: ignore[assignment]

@cached_property
@under_cached_property
def name(self) -> str:
"""Name of this state."""
return "<None>"
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/helpers/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ def object_id(self) -> str: # type: ignore[override]
return self._state.object_id

@property
def name(self) -> str:
def name(self) -> str: # type: ignore[override]
"""Wrap State.name."""
self._collect_state()
return self._state.name
Expand Down
Loading