8000 fix TypeVar signature · python/cpython@1e0b74c · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e0b74c

Browse files
committed
fix TypeVar signature
1 parent 7a5e457 commit 1e0b74c

File tree

2 files changed

+18
-22
lines changed

2 files changed

+18
-22
lines changed

Objects/clinic/typevarobject.c.h

Lines changed: 14 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Objects/typevarobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ static typevarobject *typevarobject_alloc(const char *name, PyObject *bound,
9898
typevar.__new__ as typevar_new
9999
100100
name: str
101+
*constraints: object
101102
*
102103
bound: object = None
103-
constraints: object = None
104104
covariant: bool = False
105105
contravariant: bool = False
106106
autovariance: bool = False
@@ -109,10 +109,10 @@ Create a TypeVar.
109109
[clinic start generated code]*/
110110

111111
static PyObject *
112-
typevar_new_impl(PyTypeObject *type, const char *name, PyObject *bound,
113-
PyObject *constraints, int covariant, int contravariant,
112+
typevar_new_impl(PyTypeObject *type, const char *name, PyObject *constraints,
113+
PyObject *bound, i 5A10 nt covariant, int contravariant,
114114
int autovariance)
115-
/*[clinic end generated code: output=1a13d705ffbce358 input=ef28fd4e62fcfc83]*/
115+
/*[clinic end generated code: output=e74ea8371ab8103a input=9d08a995b997a11b]*/
116116
{
117117
if (covariant && contravariant) {
118118
PyErr_SetString(PyExc_ValueError,

0 commit comments

Comments
 (0)
0