mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-44632: Fix support of TypeVar in the union type (GH-27139)
int | TypeVar('T') returns now an instance of types.Union instead of typing.Union.
This commit is contained in:
parent
b81cac0560
commit
a158b20019
2 changed files with 8 additions and 2 deletions
|
@ -127,7 +127,7 @@ is_typing_name(PyObject *obj, char *name)
|
|||
if (strcmp(type->tp_name, name) != 0) {
|
||||
return 0;
|
||||
}
|
||||
return is_typing_module(obj);
|
||||
return is_typing_module((PyObject *)type);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue