Skip to content

Commit 07fa88b

Browse files
authored
Merge pull request #28 from franccesco/dream/2026-07-23.1/finding-008
dream: annotate client context managers with Self
2 parents d2575bf + ac35d68 commit 07fa88b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/bloomy/async_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import TYPE_CHECKING
5+
from typing import TYPE_CHECKING, Self
66

77
import httpx
88

@@ -112,7 +112,7 @@ def __init__(
112112
self._client
113113
)
114114

115-
async def __aenter__(self) -> AsyncClient:
115+
async def __aenter__(self) -> Self:
116116
"""Enter the async context manager.
117117
118118
Returns:

src/bloomy/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import TYPE_CHECKING
5+
from typing import TYPE_CHECKING, Self
66

77
import httpx
88

@@ -92,7 +92,7 @@ def __init__(
9292
self.issue = IssueOperations(self._client)
9393
self.headline = HeadlineOperations(self._client)
9494

95-
def __enter__(self) -> Client:
95+
def __enter__(self) -> Self:
9696
"""Context manager entry.
9797
9898
Returns:

0 commit comments

Comments
 (0)