Skip to content

Commit

Permalink
fix: Add slashes for positional-only parameters to make mypy pass
Browse files Browse the repository at this point in the history
  • Loading branch information
empicano committed Aug 22, 2023
1 parent 1506b11 commit 48cc226
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aiomqtt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _outgoing_call(
method: Callable[Concatenate[ClientT, P], Coroutine[Any, Any, T]]
) -> Callable[Concatenate[ClientT, P], Coroutine[Any, Any, T]]:
@functools.wraps(method)
async def decorated(self: ClientT, *args: P.args, **kwargs: P.kwargs) -> T:
async def decorated(self: ClientT, /, *args: P.args, **kwargs: P.kwargs) -> T:
if not self._outgoing_calls_sem:
return await method(self, *args, **kwargs)

Expand Down Expand Up @@ -549,6 +549,7 @@ def _force_disconnect(self) -> None:
@_outgoing_call
async def subscribe( # noqa: PLR0913
self,
/,
topic: SubscribeTopic,
qos: int = 0,
options: mqtt.SubscribeOptions | None = None,
Expand Down Expand Up @@ -589,6 +590,7 @@ async def subscribe( # noqa: PLR0913
@_outgoing_call
async def unsubscribe(
self,
/,
topic: str | list[str],
properties: Properties | None = None,
*args: Any,
Expand Down Expand Up @@ -620,6 +622,7 @@ async def unsubscribe(
@_outgoing_call
async def publish( # noqa: PLR0913
self,
/,
topic: str,
payload: PayloadType = None,
qos: int = 0,
Expand Down

0 comments on commit 48cc226

Please sign in to comment.