Skip to content

Commit

Permalink
Rename covariant T to T_co. (#1026)
Browse files Browse the repository at this point in the history
  • Loading branch information
InspiredImpact authored Feb 23, 2022
1 parent a1237ee commit 50f950a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions hikari/internal/data_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import concurrent
import contextlib

T = typing.TypeVar("T", covariant=True)
T_co = typing.TypeVar("T_co", covariant=True)

Headers = typing.Mapping[str, str]
"""Type hint for HTTP headers."""
Expand Down Expand Up @@ -170,10 +170,10 @@ def put(
def put(
self,
key: str,
value: undefined.UndefinedOr[T],
value: undefined.UndefinedOr[T_co],
/,
*,
conversion: typing.Callable[[T], Stringish],
conversion: typing.Callable[[T_co], Stringish],
) -> None:
...

Expand Down Expand Up @@ -255,10 +255,10 @@ def put(self, key: str, value: undefined.UndefinedNoneOr[JSONish], /) -> None:
def put(
self,
key: str,
value: undefined.UndefinedNoneOr[T],
value: undefined.UndefinedNoneOr[T_co],
/,
*,
conversion: typing.Callable[[T], JSONish],
conversion: typing.Callable[[T_co], JSONish],
) -> None:
...

Expand Down Expand Up @@ -309,10 +309,10 @@ def put_array(
def put_array(
self,
key: str,
values: undefined.UndefinedOr[typing.Iterable[T]],
values: undefined.UndefinedOr[typing.Iterable[T_co]],
/,
*,
conversion: typing.Callable[[T], JSONish],
conversion: typing.Callable[[T_co], JSONish],
) -> None:
...

Expand All @@ -334,7 +334,7 @@ def put_array(
----------
key : builtins.str
The key to give the element.
values : hikari.undefined.UndefinedOr[typing.Iterable[T]]
values : hikari.undefined.UndefinedOr[typing.Iterable[T_co]]
The JSON types to put. This may be an iterable of non-JSON types if
a conversion is also specified. This may alternatively be undefined.
In the latter case, nothing is performed.
Expand Down

0 comments on commit 50f950a

Please sign in to comment.