removed aiofs

This commit is contained in:
Maxim Devaev
2023-03-22 04:44:07 +02:00
parent 6c0f5cccb9
commit 22db176ef0
5 changed files with 20 additions and 49 deletions

View File

@@ -26,7 +26,6 @@ import asyncio
import ssl
import functools
import types
import typing
from typing import Callable
@@ -35,9 +34,17 @@ from typing import Coroutine
from typing import TypeVar
from typing import Any
import aiofiles
from .logging import get_logger
# =====
async def read_file(path: str) -> str:
async with aiofiles.open(path) as file:
return (await file.read())
# =====
def run(coro: Coroutine, final: (Coroutine | None)=None) -> None:
# https://github.com/aio-libs/aiohttp/blob/a1d4dac1d/aiohttp/web.py#L515