Skip to content

Commit fb50dd2

Browse files
committed
Type fix
1 parent cd0f58b commit fb50dd2

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
v0.1.1 (in development)
2+
-----------------------
3+
- Fix the type annotation on `Client.__enter__` to support subclassing
4+
5+
v0.1.0 (2023-10-21)
6+
-------------------
7+
Initial release

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
`GitHub <https://github.com/jwodder/ghreq>`_
2121
| `PyPI <https://pypi.org/project/ghreq/>`_
2222
| `Issues <https://github.com/jwodder/ghreq/issues>`_
23+
| `Changelog <https://github.com/jwodder/ghreq/blob/master/CHANGELOG.md>`_
2324
2425
``ghreq`` is a simple wrapper around requests_ with various customizations
2526
aimed at working with the GitHub REST API. Notable features include:

src/ghreq/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
from typing import TYPE_CHECKING, Any, Literal, overload
5050
import requests
5151

52-
__version__ = "0.1.0"
52+
__version__ = "0.1.1.dev1"
5353
__author__ = "John Thorvald Wodder II"
5454
__author_email__ = "ghreq@varonathe.org"
5555
__license__ = "MIT"
@@ -81,7 +81,7 @@
8181

8282
if TYPE_CHECKING:
8383
from typing import IO, List, Tuple, Union
84-
from typing_extensions import TypeAlias
84+
from typing_extensions import Self, TypeAlias
8585

8686
ParamsValue: TypeAlias = Union[
8787
str, bytes, int, float, Iterable[Union[str, bytes, int, float]], None
@@ -184,7 +184,7 @@ def __init__(
184184
self.retry_config = retry_config
185185
self.last_mutation: datetime | None = None
186186

187-
def __enter__(self) -> Client:
187+
def __enter__(self) -> Self:
188188
return self
189189

190190
def __exit__(

0 commit comments

Comments
 (0)