mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 14:46:40 +00:00
py39
This commit is contained in:
parent
df389527a0
commit
8b03c6a857
@ -8,7 +8,7 @@ import sys
|
|||||||
from types import FrameType
|
from types import FrameType
|
||||||
|
|
||||||
|
|
||||||
@dataclass(kw_only=True)
|
@dataclass()
|
||||||
class ComponentFrame:
|
class ComponentFrame:
|
||||||
"""Component frame container."""
|
"""Component frame container."""
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ class ComponentFrame:
|
|||||||
def get_current_frame(depth: int = 0) -> FrameType:
|
def get_current_frame(depth: int = 0) -> FrameType:
|
||||||
"""Return the current frame."""
|
"""Return the current frame."""
|
||||||
# Add one to depth since get_current_frame is included
|
# Add one to depth since get_current_frame is included
|
||||||
return sys._getframe(depth + 1) # noqa: SLF001
|
return sys._getframe(depth + 1) # pylint: disable=protected-access
|
||||||
|
|
||||||
|
|
||||||
class MissingComponentFrame(Exception):
|
class MissingComponentFrame(Exception):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user