Skip to content

Commit

Permalink
fix: workflows: asyncio
Browse files Browse the repository at this point in the history
  • Loading branch information
ShoytovMA committed Mar 7, 2024
1 parent ba09e9a commit 0aef3c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions fsconnectors/asyncio/connector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import List, Any
from abc import ABC, abstractmethod
from contextlib import asynccontextmanager
from typing import List, Any, AsyncGenerator

from fsconnectors.utils.entry import FSEntry

Expand All @@ -11,7 +11,7 @@ class AsyncConnector(ABC):
@classmethod
@abstractmethod
@asynccontextmanager
async def connect(cls, *args, **kwargs) -> 'AsyncConnector':
async def connect(cls, *args, **kwargs) -> AsyncGenerator['AsyncConnector', None]:
"""Connects to file system.
Yields
Expand Down
4 changes: 2 additions & 2 deletions fsconnectors/asyncio/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import aiofiles
import aioshutil
import aiofiles.os
from typing import List, Any
from contextlib import asynccontextmanager
from typing import List, Any, AsyncGenerator

from fsconnectors.utils.entry import FSEntry
from fsconnectors.asyncio.connector import AsyncConnector
Expand All @@ -15,7 +15,7 @@ class AsyncLocalConnector(AsyncConnector):

@classmethod
@asynccontextmanager
async def connect(cls) -> 'AsyncLocalConnector':
async def connect(cls) -> AsyncGenerator['AsyncLocalConnector', None]:
"""Connects to file system.
Yields
Expand Down
4 changes: 2 additions & 2 deletions fsconnectors/asyncio/s3.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import yaml
import aioboto3
import aiofiles.tempfile
from typing import List, Any, Literal
from contextlib import asynccontextmanager
from typing import List, Any, AsyncGenerator

from fsconnectors.utils.entry import FSEntry
from fsconnectors.utils.multipart import AsyncMultipartWriter
Expand All @@ -19,7 +19,7 @@ async def connect(
endpoint_url: str,
aws_access_key_id: str,
aws_secret_access_key: str
) -> 'AsyncS3Connector':
) -> AsyncGenerator['AsyncS3Connector', None]:
"""Connects to file system.
Parameters
Expand Down

0 comments on commit 0aef3c1

Please sign in to comment.