mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Provide special type for typing.TypeVar as a callee (PY-28127)
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
from typing import TypeVar
|
||||
|
||||
TypeVar("T")
|
||||
TypeVar("T", int)
|
||||
TypeVar("T", int, str)
|
||||
|
||||
TypeVar("T", bound=int)
|
||||
TypeVar("T", int, bound=int)
|
||||
TypeVar("T", int, str, bound=int)
|
||||
|
||||
TypeVar("T", <warning descr="Unexpected argument">bd=int</warning>)
|
||||
TypeVar("T", int, <warning descr="Unexpected argument">bd=int</warning>)
|
||||
TypeVar("T", int, str, <warning descr="Unexpected argument">bd=int</warning>)
|
||||
|
||||
TypeVar("T", bound=int, covariant=True)
|
||||
TypeVar("T", int, bound=int, covariant=True)
|
||||
TypeVar("T", int, str, bound=int, covariant=True)
|
||||
|
||||
TypeVar("T", bound=int, <warning descr="Unexpected argument">cant=True</warning>)
|
||||
TypeVar("T", int, bound=int, <warning descr="Unexpected argument">cant=True</warning>)
|
||||
TypeVar("T", int, str, bound=int, <warning descr="Unexpected argument">cant=True</warning>)
|
||||
|
||||
TypeVar("T", bound=int, covariant=True, contravariant=True)
|
||||
TypeVar("T", int, bound=int, covariant=True, contravariant=True)
|
||||
TypeVar("T", int, str, bound=int, covariant=True, contravariant=True)
|
||||
|
||||
TypeVar("T", bound=int, covariant=True, <warning descr="Unexpected argument">cant=True</warning>)
|
||||
TypeVar("T", int, bound=int, covariant=True, <warning descr="Unexpected argument">cant=True</warning>)
|
||||
TypeVar("T", int, str, bound=int, covariant=True, <warning descr="Unexpected argument">cant=True</warning>)
|
||||
|
||||
TypeVar("T", bound=int, covariant=True, contravariant=True, <warning descr="Unexpected argument">more=5</warning>)
|
||||
TypeVar("T", int, bound=int, covariant=True, contravariant=True, <warning descr="Unexpected argument">more=5</warning>)
|
||||
TypeVar("T", int, str, bound=int, covariant=True, contravariant=True, <warning descr="Unexpected argument">more=5</warning>)
|
||||
@@ -0,0 +1,4 @@
|
||||
from typing import TypeVar
|
||||
|
||||
TypeVar("T", int, str, bound=int, covariant=True, contravariant=True)
|
||||
TypeVar("T", <warning descr="Expected type 'type', got 'int' instead">0</warning>, <warning descr="Expected type 'type', got 'int' instead">1</warning>, <warning descr="Expected type 'type', got 'int' instead">bound=2</warning>, <warning descr="Expected type 'bool', got 'int' instead">covariant=3</warning>, <warning descr="Expected type 'bool', got 'int' instead">contravariant=4</warning>)
|
||||
Reference in New Issue
Block a user