This commit is contained in:
J. Nick Koston 2025-02-19 10:39:29 -06:00
parent df389527a0
commit 8b03c6a857
No known key found for this signature in database

View File

@ -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):