Skip to content
Snippets Groups Projects
Commit db215ad3 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

asyncio.sleep inside loop marked with # noqua: ASYNC110 to prevent linter failure

parent ead1876d
No related branches found
No related tags found
1 merge request!79ubuntu24.04 update
...@@ -85,7 +85,7 @@ class AsyncHttpServer(ContextAsync[Self]): # type: ignore[misc] ...@@ -85,7 +85,7 @@ class AsyncHttpServer(ContextAsync[Self]): # type: ignore[misc]
await self.__site.start() await self.__site.start()
self.__running = True self.__running = True
try: try:
while self.__running: while self.__running: # noqa: ASYNC110
await asyncio.sleep(time_between_checks_is_server_running) await asyncio.sleep(time_between_checks_is_server_running)
finally: finally:
await self.__site.stop() await self.__site.stop()
......
...@@ -57,7 +57,7 @@ class SyncDelayGuard(DelayGuardBase, ContextSync["SyncDelayGuard"]): ...@@ -57,7 +57,7 @@ class SyncDelayGuard(DelayGuardBase, ContextSync["SyncDelayGuard"]):
class AsyncDelayGuard(DelayGuardBase, ContextAsync["AsyncDelayGuard"]): class AsyncDelayGuard(DelayGuardBase, ContextAsync["AsyncDelayGuard"]):
async def _aenter(self) -> AsyncDelayGuard: async def _aenter(self) -> AsyncDelayGuard:
while self._waiting_should_continue(): while self._waiting_should_continue(): # noqa: ASYNC110
await asyncio.sleep(self._wait_time) await asyncio.sleep(self._wait_time)
return self return self
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment