@@ -1540,8 +1540,8 @@ from queue import Queue
15401540x: Future[str]
15411541y: Queue[int]
15421542
1543- p: Future # E: Missing type parameters for generic type "Future"
1544- q: Queue # E: Missing type parameters for generic type "Queue"
1543+ p: Future # E: Missing type arguments for generic type "Future"
1544+ q: Queue # E: Missing type arguments for generic type "Queue"
15451545[file asyncio/__init__.pyi]
15461546from asyncio.futures import Future as Future
15471547[file asyncio/futures.pyi]
@@ -1558,25 +1558,25 @@ class Queue(Generic[_T]): ...
15581558[case testDisallowAnyGenericsBuiltinTuple]
15591559# flags: --disallow-any-generics
15601560s = tuple([1, 2, 3])
1561- def f(t: tuple) -> None: pass # E: Missing type parameters for generic type "tuple"
1561+ def f(t: tuple) -> None: pass # E: Missing type arguments for generic type "tuple"
15621562[builtins fixtures/tuple.pyi]
15631563
15641564[case testDisallowAnyGenericsBuiltinList]
15651565# flags: --disallow-any-generics
15661566l = list([1, 2, 3])
1567- def f(t: list) -> None: pass # E: Missing type parameters for generic type "list"
1567+ def f(t: list) -> None: pass # E: Missing type arguments for generic type "list"
15681568[builtins fixtures/list.pyi]
15691569
15701570[case testDisallowAnyGenericsBuiltinSet]
15711571# flags: --disallow-any-generics
15721572l = set({1, 2, 3})
1573- def f(s: set) -> None: pass # E: Missing type parameters for generic type "set"
1573+ def f(s: set) -> None: pass # E: Missing type arguments for generic type "set"
15741574[builtins fixtures/set.pyi]
15751575
15761576[case testDisallowAnyGenericsBuiltinDict]
15771577# flags: --disallow-any-generics
15781578l = dict([('a', 1)])
1579- def f(d: dict) -> None: pass # E: Missing type parameters for generic type "dict"
1579+ def f(d: dict) -> None: pass # E: Missing type arguments for generic type "dict"
15801580[builtins fixtures/dict.pyi]
15811581
15821582[case testCheckDefaultAllowAnyGeneric]
@@ -1607,9 +1607,8 @@ from typing import TypeVar, Callable
16071607T = TypeVar('T')
16081608C = Callable[[], T]
16091609
1610- def f(c: C): # E: Missing type parameters for generic type "C"
1610+ def f(c: C): # E: Missing type arguments for generic type "C"
16111611 pass
1612- [out]
16131612
16141613[case testStrictAnyGeneric]
16151614# flags: --strict
@@ -1620,9 +1619,8 @@ T = TypeVar('T')
16201619class A(Generic[T]):
16211620 pass
16221621
1623- def f(c: A) -> None: # E: Missing type parameters for generic type "A"
1622+ def f(c: A) -> None: # E: Missing type arguments for generic type "A"
16241623 pass
1625- [out]
16261624
16271625[case testStrictInConfigAnyGeneric]
16281626# flags: --config-file tmp/mypy.ini
@@ -1633,12 +1631,11 @@ T = TypeVar('T')
16331631class A(Generic[T]):
16341632 pass
16351633
1636- def f(c: A) -> None: # E: Missing type parameters for generic type "A"
1634+ def f(c: A) -> None: # E: Missing type arguments for generic type "A"
16371635 pass
16381636[file mypy.ini]
16391637\[mypy]
16401638strict = True
1641- [out]
16421639
16431640
16441641[case testStrictInConfigAnyGenericPyProjectTOML]
@@ -1650,15 +1647,13 @@ T = TypeVar('T')
16501647class A(Generic[T]):
16511648 pass
16521649
1653- def f(c: A) -> None: # E: Missing type parameters for generic type "A"
1650+ def f(c: A) -> None: # E: Missing type arguments for generic type "A"
16541651 pass
16551652
16561653[file pyproject.toml]
16571654\[tool.mypy]
16581655strict = true
16591656
1660- [out]
1661-
16621657
16631658[case testStrictFalseInConfigAnyGeneric]
16641659# flags: --config-file tmp/mypy.ini
@@ -1856,8 +1851,8 @@ main:2: error: Module "other_module_2" does not explicitly export attribute "a"
18561851from typing import List
18571852
18581853A = List # OK
1859- B = List[A] # E:10: Missing type parameters for generic type "A"
1860- x: A # E:4: Missing type parameters for generic type "A"
1854+ B = List[A] # E:10: Missing type arguments for generic type "A"
1855+ x: A # E:4: Missing type arguments for generic type "A"
18611856[builtins fixtures/list.pyi]
18621857
18631858[case testDisallowAnyExplicitDefSignature]
@@ -1982,20 +1977,20 @@ N = TypedDict('N', {'x': str, 'y': List}) # no error
19821977# flags: --disallow-any-generics
19831978from typing import Tuple
19841979
1985- def f(s: Tuple) -> None: pass # E: Missing type parameters for generic type "Tuple"
1986- def g(s) -> Tuple: # E: Missing type parameters for generic type "Tuple"
1980+ def f(s: Tuple) -> None: pass # E: Missing type arguments for generic type "Tuple"
1981+ def g(s) -> Tuple: # E: Missing type arguments for generic type "Tuple"
19871982 return 'a', 'b'
19881983def h(s) -> Tuple[str, str]: # no error
19891984 return 'a', 'b'
1990- x: Tuple = () # E: Missing type parameters for generic type "Tuple"
1985+ x: Tuple = () # E: Missing type arguments for generic type "Tuple"
19911986[builtins fixtures/tuple.pyi]
19921987
19931988[case testDisallowAnyGenericsTupleWithNoTypeParamsGeneric]
19941989# flags: --disallow-any-generics
19951990from typing import Tuple, List
19961991
1997- def f(s: Tuple) -> None: pass # E: Missing type parameters for generic type "Tuple"
1998- def g(s: List[Tuple]) -> None: pass # E: Missing type parameters for generic type "Tuple"
1992+ def f(s: Tuple) -> None: pass # E: Missing type arguments for generic type "Tuple"
1993+ def g(s: List[Tuple]) -> None: pass # E: Missing type arguments for generic type "Tuple"
19991994def h(s: List[Tuple[str, str]]) -> None: pass # no error
20001995[builtins fixtures/list.pyi]
20011996
@@ -2004,19 +1999,19 @@ def h(s: List[Tuple[str, str]]) -> None: pass # no error
20041999from typing import Type, Any
20052000
20062001def f(s: Type[Any]) -> None: pass # no error
2007- def g(s) -> Type: # E: Missing type parameters for generic type "Type"
2002+ def g(s) -> Type: # E: Missing type arguments for generic type "Type"
20082003 return s
20092004def h(s) -> Type[str]: # no error
20102005 return s
2011- x: Type = g(0) # E: Missing type parameters for generic type "Type"
2006+ x: Type = g(0) # E: Missing type arguments for generic type "Type"
20122007
20132008[case testDisallowAnyGenericsAliasGenericType]
20142009# flags: --disallow-any-generics
20152010from typing import List
20162011
20172012L = List # no error
20182013
2019- def f(l: L) -> None: pass # E: Missing type parameters for generic type "L"
2014+ def f(l: L) -> None: pass # E: Missing type arguments for generic type "L"
20202015def g(l: L[str]) -> None: pass # no error
20212016[builtins fixtures/list.pyi]
20222017
@@ -2027,47 +2022,47 @@ from typing import TypeVar, Tuple
20272022T = TypeVar('T')
20282023A = Tuple[T, str, T]
20292024
2030- def f(s: A) -> None: pass # E: Missing type parameters for generic type "A"
2031- def g(s) -> A: # E: Missing type parameters for generic type "A"
2025+ def f(s: A) -> None: pass # E: Missing type arguments for generic type "A"
2026+ def g(s) -> A: # E: Missing type arguments for generic type "A"
20322027 return 'a', 'b', 1
20332028def h(s) -> A[str]: # no error
20342029 return 'a', 'b', 'c'
2035- x: A = ('a', 'b', 1) # E: Missing type parameters for generic type "A"
2030+ x: A = ('a', 'b', 1) # E: Missing type arguments for generic type "A"
20362031[builtins fixtures/tuple.pyi]
20372032
20382033[case testDisallowAnyGenericsPlainList]
20392034# flags: --disallow-any-generics
20402035from typing import List
20412036
2042- def f(l: List) -> None: pass # E: Missing type parameters for generic type "List"
2037+ def f(l: List) -> None: pass # E: Missing type arguments for generic type "List"
20432038def g(l: List[str]) -> None: pass
2044- def h(l: List[List]) -> None: pass # E: Missing type parameters for generic type "List"
2045- def i(l: List[List[List[List]]]) -> None: pass # E: Missing type parameters for generic type "List"
2046- def j() -> List: pass # E: Missing type parameters for generic type "List"
2039+ def h(l: List[List]) -> None: pass # E: Missing type arguments for generic type "List"
2040+ def i(l: List[List[List[List]]]) -> None: pass # E: Missing type arguments for generic type "List"
2041+ def j() -> List: pass # E: Missing type arguments for generic type "List"
20472042
20482043x = [] # E: Need type annotation for "x" (hint: "x: list[<type>] = ...")
2049- y: List = [] # E: Missing type parameters for generic type "List"
2044+ y: List = [] # E: Missing type arguments for generic type "List"
20502045[builtins fixtures/list.pyi]
20512046
20522047[case testDisallowAnyGenericsPlainDict]
20532048# flags: --disallow-any-generics
20542049from typing import List, Dict
20552050
2056- def f(d: Dict) -> None: pass # E: Missing type parameters for generic type "Dict"
2057- def g(d: Dict[str, Dict]) -> None: pass # E: Missing type parameters for generic type "Dict"
2058- def h(d: List[Dict]) -> None: pass # E: Missing type parameters for generic type "Dict"
2051+ def f(d: Dict) -> None: pass # E: Missing type arguments for generic type "Dict"
2052+ def g(d: Dict[str, Dict]) -> None: pass # E: Missing type arguments for generic type "Dict"
2053+ def h(d: List[Dict]) -> None: pass # E: Missing type arguments for generic type "Dict"
20592054
2060- d: Dict = {} # E: Missing type parameters for generic type "Dict"
2055+ d: Dict = {} # E: Missing type arguments for generic type "Dict"
20612056[builtins fixtures/dict.pyi]
20622057
20632058[case testDisallowAnyGenericsPlainSet]
20642059# flags: --disallow-any-generics
20652060from typing import Set
20662061
2067- def f(s: Set) -> None: pass # E: Missing type parameters for generic type "Set"
2068- def g(s: Set[Set]) -> None: pass # E: Missing type parameters for generic type "Set"
2062+ def f(s: Set) -> None: pass # E: Missing type arguments for generic type "Set"
2063+ def g(s: Set[Set]) -> None: pass # E: Missing type arguments for generic type "Set"
20692064
2070- s: Set = set() # E: Missing type parameters for generic type "Set"
2065+ s: Set = set() # E: Missing type arguments for generic type "Set"
20712066[builtins fixtures/set.pyi]
20722067
20732068[case testDisallowAnyGenericsCustomGenericClass]
@@ -2077,11 +2072,11 @@ from typing import Generic, TypeVar, Any
20772072T = TypeVar('T')
20782073class G(Generic[T]): pass
20792074
2080- def f() -> G: # E: Missing type parameters for generic type "G"
2075+ def f() -> G: # E: Missing type arguments for generic type "G"
20812076 return G()
20822077
20832078x: G[Any] = G() # no error
2084- y: G = x # E: Missing type parameters for generic type "G"
2079+ y: G = x # E: Missing type arguments for generic type "G"
20852080
20862081[case testDisallowAnyGenericsForAliasesInRuntimeContext]
20872082# flags: --disallow-any-generics
@@ -2093,8 +2088,8 @@ class G(Generic[T]):
20932088 def foo(cls) -> T: ...
20942089
20952090A = G[Tuple[T, T]]
2096- A() # E: Missing type parameters for generic type "A"
2097- A.foo() # E: Missing type parameters for generic type "A"
2091+ A() # E: Missing type arguments for generic type "A"
2092+ A.foo() # E: Missing type arguments for generic type "A"
20982093
20992094B = G
21002095B()
@@ -2498,8 +2493,9 @@ from typing import TypeVar, Generic, List, Union
24982493
24992494class C(Generic[T]): ...
25002495
2501- A = Union[C, List] # E: Missing type parameters for generic type "C" \
2502- # E: Missing type parameters for generic type "List"
2496+ A = Union[C, List] # E: Missing type arguments for generic type "C" \
2497+ # E: Missing type arguments for generic type "List"
2498+
25032499[builtins fixtures/list.pyi]
25042500
25052501[case testNestedGenericInAliasAllow]
0 commit comments