remove unused import and dead code

This commit is contained in:
Victor Shyba 2022-03-09 20:03:27 -03:00
parent 16a2023bbd
commit 4e09b35012
2 changed files with 0 additions and 16 deletions

View file

@ -1,6 +1,5 @@
import asyncio
import ipaddress
import time
import typing
import logging
import binascii

View file

@ -131,21 +131,6 @@ def json_dumps_pretty(obj, **kwargs):
return json.dumps(obj, sort_keys=True, indent=2, separators=(',', ': '), **kwargs)
def cancel_task(task: typing.Optional[asyncio.Task]):
if task and not task.done():
task.cancel()
def cancel_tasks(tasks: typing.List[typing.Optional[asyncio.Task]]):
for task in tasks:
cancel_task(task)
def drain_tasks(tasks: typing.List[typing.Optional[asyncio.Task]]):
while tasks:
cancel_task(tasks.pop())
def async_timed_cache(duration: int):
def wrapper(func):
cache: typing.Dict[typing.Tuple,