Skip to content

Commit f1d285e

Browse files
committed
Shift some type variables around
1 parent 176c9e0 commit f1d285e

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

pytools/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@
250250
# {{{ type variables
251251

252252
T = TypeVar("T")
253-
R = TypeVar("R")
253+
T_co = TypeVar("T_co", covariant=True)
254+
T_contra = TypeVar("T_contra", contravariant=True)
255+
R = TypeVar("R", covariant=True)
254256
F = TypeVar("F", bound=Callable[..., Any])
255257
P = ParamSpec("P")
256258
K = TypeVar("K")
@@ -1492,9 +1494,6 @@ def generate_all_integer_tuples_below(
14921494
n, length, least_abs))
14931495

14941496

1495-
T_co = TypeVar("T_co", covariant=True)
1496-
1497-
14981497
class _ConcatenableSequence(Generic[T_co], Protocol):
14991498
"""
15001499
A protocol that supports the following:

0 commit comments

Comments
 (0)