gh-124787: Fix `TypeAliasType` and incorrect `type_params` · python/cpython@7d439f8 · GitHub
Skip to content

Commit 7d439f8

Browse files
committed
gh-124787: Fix TypeAliasType and incorrect type_params
1 parent 6f4d64b commit 7d439f8

3 files changed

Lines changed: 133 additions & 12 deletions

File tree

Lib/test/test_type_aliases.py

Lines changed: 43 additions & 1 deletion
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fix :class:`typing.TypeAliasType` with incorrect ``type_params`` argument.
2+
Now it raises a :exc:`TypeError` when: 1. A type var without default follows
3+
a type var with default 2. Not a typelike parameter passed in
4+
``type_params`` tuple

Objects/typevarobject.c

Lines changed: 86 additions & 11 deletions

0 commit comments

Comments
 (0)