Skip to content

Commit

Permalink
Unquoted return type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Oct 2, 2022
1 parent 70188d3 commit a58d1bc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/anyio/_backends/_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def __init__(self) -> None:
self._active = False
self._exceptions: list[BaseException] = []

async def __aenter__(self) -> "TaskGroup":
async def __aenter__(self) -> TaskGroup:
self.cancel_scope.__enter__()
self._active = True
return self
Expand Down
2 changes: 1 addition & 1 deletion src/anyio/_backends/_trio.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __init__(self) -> None:
self._nursery_manager = trio.open_nursery()
self.cancel_scope = None # type: ignore[assignment]

async def __aenter__(self) -> "TaskGroup":
async def __aenter__(self) -> TaskGroup:
self._active = True
self._nursery = await self._nursery_manager.__aenter__()
self.cancel_scope = CancelScope(self._nursery.cancel_scope)
Expand Down
2 changes: 1 addition & 1 deletion src/anyio/_core/_fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def wrap_file(file: IO[AnyStr]) -> AsyncFile[AnyStr]:
class _PathIterator(AsyncIterator["Path"]):
iterator: Iterator[PathLike[str]]

async def __anext__(self) -> "Path":
async def __anext__(self) -> Path:
nextval = await to_thread.run_sync(next, self.iterator, None, cancellable=True)
if nextval is None:
raise StopAsyncIteration from None
Expand Down
2 changes: 1 addition & 1 deletion src/anyio/_core/_synchronization.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def __init__(self, initial_value: int, *, max_value: int | None = None):
self._max_value = max_value
self._waiters: deque[Event] = deque()

async def __aenter__(self) -> "Semaphore":
async def __aenter__(self) -> Semaphore:
await self.acquire()
return self

Expand Down
2 changes: 1 addition & 1 deletion src/anyio/from_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __init__(self) -> None:
self._task_group = create_task_group()
self._cancelled_exc_class = get_cancelled_exc_class()

async def __aenter__(self) -> "BlockingPortal":
async def __aenter__(self) -> BlockingPortal:
await self._task_group.__aenter__()
return self

Expand Down

0 comments on commit a58d1bc

Please sign in to comment.