lint = "ruff format --check --diff . && ruff check --diff ."
[tool.ruff.lint]
-select = ["E", "W", "F", "B", "Q", "I"]
+select = ["E", "W", "F", "ASYNC", "S", "B", "A", "Q", "RUF", "I"]
[build-system]
period: Optional[float],
):
"""For every new charge point that connects, create a ChargePoint instance and start
- listening for messages."""
+ listening for messages.
+ """
try:
requested_protocols = websocket.request_headers["Sec-WebSocket-Protocol"]
except KeyError:
-"""
-Timer for asyncio.
-"""
+"""Timer for asyncio."""
import asyncio
"""An asynchronous Timer object.
Parameters
- -----------
+ ----------
timeout: :class:`float`:
The duration for which the timer should last.
callback_kwargs: Optional[:class:`dict`]:
The kwargs to be passed to the callback.
+
"""
self._timeout = timeout
self._repeat = repeat
self._callback(*self._callback_args, **self._callback_kwargs)
def cancel(self):
- """
- Cancels the timer. The callback will not be called.
- """
+ """Cancels the timer. The callback will not be called."""
self._task.cancel()