From e9d0fa0dd266b6fee1bdc13c41342475798b96ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joris=20Pelgr=C3=B6m?= Date: Sun, 24 Aug 2025 14:10:06 +0200 Subject: [PATCH] Fix requires_feature annotation with named arguments --- letpot/deviceclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letpot/deviceclient.py b/letpot/deviceclient.py index c113c42..32566e5 100644 --- a/letpot/deviceclient.py +++ b/letpot/deviceclient.py @@ -51,7 +51,7 @@ def decorator( @wraps(func) async def wrapper(*args: P.args, **kwargs: P.kwargs) -> _R: self = cast(LetPotDeviceClient, args[0]) - serial = cast(str, args[1]) + serial = cast(str, args[1] if len(args) >= 2 else kwargs["serial"]) exception_message = f"Device missing required feature: {required_feature}" try: supported_features = self._converter(serial).supported_features()