Skip to content
Merged
Changes from all commits
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
4 changes: 3 additions & 1 deletion lewis/utils/replies.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
P = ParamSpec("P")


def _get_device_from(instance: StreamInterface):

Check failure on line 31 in lewis/utils/replies.py

View workflow job for this annotation

GitHub Actions / call-linter-workflow / ruff

Ruff (ANN202)

lewis/utils/replies.py:31:5: ANN202 Missing return type annotation for private function `_get_device_from`
try:
device = instance.device
except AttributeError:
Expand All @@ -41,7 +41,9 @@
return device


def conditional_reply(property_name: str, reply: str | None = None) -> Callable[P, T]:
def conditional_reply(
property_name: str, reply: str | None = None
) -> Callable[[Callable[P, T]], Callable[P, T]]:
"""
Decorator that executes the command and replies if the device has a member called
'property name' and it is True in a boolean context.
Expand Down
Loading