@@ -145,7 +145,7 @@ def __getitem__(self, params):
145
145
pytest .param (AnyStr , "typing" , "AnyStr" , (), id = "AnyStr" ),
146
146
pytest .param (Dict , "typing" , "Dict" , (), id = "Dict" ),
147
147
pytest .param (Dict [str , int ], "typing" , "Dict" , (str , int ), id = "Dict_parametrized" ),
148
- pytest .param (Dict [T , int ], "typing" , "Dict" , (T , int ), id = "Dict_typevar" ),
148
+ pytest .param (Dict [T , int ], "typing" , "Dict" , (T , int ), id = "Dict_typevar" ), # type: ignore[valid-type]
149
149
pytest .param (Tuple , "typing" , "Tuple" , (), id = "Tuple" ),
150
150
pytest .param (Tuple [str , int ], "typing" , "Tuple" , (str , int ), id = "Tuple_parametrized" ),
151
151
pytest .param (Union [str , int ], "typing" , "Union" , (str , int ), id = "Union" ),
@@ -203,25 +203,31 @@ def test_parse_annotation(annotation: Any, module: str, class_name: str, args: t
203
203
(AnyStr , ":py:data:`~typing.AnyStr`" ),
204
204
(Generic [T ], ":py:class:`~typing.Generic`\\ [:py:class:`~typing.TypeVar`\\ (``T``)]" ),
205
205
(Mapping , ":py:class:`~typing.Mapping`" ),
206
- (Mapping [T , int ], ":py:class:`~typing.Mapping`\\ [:py:class:`~typing.TypeVar`\\ (``T``), :py:class:`int`]" ),
207
206
(
208
- Mapping [str , V ],
207
+ Mapping [T , int ], # type: ignore[valid-type]
208
+ ":py:class:`~typing.Mapping`\\ [:py:class:`~typing.TypeVar`\\ (``T``), :py:class:`int`]" ,
209
+ ),
210
+ (
211
+ Mapping [str , V ], # type: ignore[valid-type]
209
212
":py:class:`~typing.Mapping`\\ [:py:class:`str`, :py:class:`~typing.TypeVar`\\ (``V``, contravariant=True)]" ,
210
213
),
211
214
(
212
- Mapping [T , U ],
215
+ Mapping [T , U ], # type: ignore[valid-type]
213
216
":py:class:`~typing.Mapping`\\ [:py:class:`~typing.TypeVar`\\ (``T``), "
214
217
":py:class:`~typing.TypeVar`\\ (``U``, covariant=True)]" ,
215
218
),
216
219
(Mapping [str , bool ], ":py:class:`~typing.Mapping`\\ [:py:class:`str`, " ":py:class:`bool`]" ),
217
220
(Dict , ":py:class:`~typing.Dict`" ),
218
- (Dict [T , int ], ":py:class:`~typing.Dict`\\ [:py:class:`~typing.TypeVar`\\ (``T``), :py:class:`int`]" ),
219
221
(
220
- Dict [str , V ],
222
+ Dict [T , int ], # type: ignore[valid-type]
223
+ ":py:class:`~typing.Dict`\\ [:py:class:`~typing.TypeVar`\\ (``T``), :py:class:`int`]" ,
224
+ ),
225
+ (
226
+ Dict [str , V ], # type: ignore[valid-type]
221
227
":py:class:`~typing.Dict`\\ [:py:class:`str`, :py:class:`~typing.TypeVar`\\ (``V``, contravariant=True)]" ,
222
228
),
223
229
(
224
- Dict [T , U ],
230
+ Dict [T , U ], # type: ignore[valid-type]
225
231
":py:class:`~typing.Dict`\\ [:py:class:`~typing.TypeVar`\\ (``T``),"
226
232
" :py:class:`~typing.TypeVar`\\ (``U``, covariant=True)]" ,
227
233
),
@@ -304,49 +310,49 @@ def test_parse_annotation(annotation: Any, module: str, class_name: str, args: t
304
310
(
305
311
nptyping .NDArray [nptyping .Shape ["*" ], nptyping .Float ],
306
312
(
307
- ":py:class:`~nptyping.base_meta_classes .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [*], "
313
+ ":py:class:`~nptyping.ndarray .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [*], "
308
314
":py:class:`~numpy.float64`]"
309
315
),
310
316
),
311
317
(
312
318
nptyping .NDArray [nptyping .Shape ["64" ], nptyping .Float ],
313
319
(
314
- ":py:class:`~nptyping.base_meta_classes .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [64],"
320
+ ":py:class:`~nptyping.ndarray .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [64],"
315
321
" :py:class:`~numpy.float64`]"
316
322
),
317
323
),
318
324
(
319
325
nptyping .NDArray [nptyping .Shape ["*, *" ], nptyping .Float ],
320
326
(
321
- ":py:class:`~nptyping.base_meta_classes .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [*, "
327
+ ":py:class:`~nptyping.ndarray .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [*, "
322
328
"*], :py:class:`~numpy.float64`]"
323
329
),
324
330
),
325
331
(
326
332
nptyping .NDArray [nptyping .Shape ["*, ..." ], nptyping .Float ],
327
- ( ":py:class:`~nptyping.base_meta_classes .NDArray`\\ [:py:data:`~typing.Any`, :py:class:`~numpy.float64`]" ) ,
333
+ ":py:class:`~nptyping.ndarray .NDArray`\\ [:py:data:`~typing.Any`, :py:class:`~numpy.float64`]" ,
328
334
),
329
335
(
330
336
nptyping .NDArray [nptyping .Shape ["*, 3" ], nptyping .Float ],
331
337
(
332
- ":py:class:`~nptyping.base_meta_classes .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [*, 3"
338
+ ":py:class:`~nptyping.ndarray .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [*, 3"
333
339
"], :py:class:`~numpy.float64`]"
334
340
),
335
341
),
336
342
(
337
343
nptyping .NDArray [nptyping .Shape ["3, ..." ], nptyping .Float ],
338
344
(
339
- ":py:class:`~nptyping.base_meta_classes .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [3, "
345
+ ":py:class:`~nptyping.ndarray .NDArray`\\ [:py:class:`~nptyping.base_meta_classes.Shape`\\ [3, "
340
346
"...], :py:class:`~numpy.float64`]"
341
347
),
342
348
),
343
349
(
344
350
RecList ,
345
- ( ":py:data:`~typing.Union`\\ [:py:class:`int`, :py:class:`~typing.List`\\ [RecList]]" ) ,
351
+ ":py:data:`~typing.Union`\\ [:py:class:`int`, :py:class:`~typing.List`\\ [RecList]]" ,
346
352
),
347
353
(
348
354
MutualRecA ,
349
- ( ":py:data:`~typing.Union`\\ [:py:class:`bool`, :py:class:`~typing.List`\\ [MutualRecB]]" ) ,
355
+ ":py:data:`~typing.Union`\\ [:py:class:`bool`, :py:class:`~typing.List`\\ [MutualRecB]]" ,
350
356
),
351
357
],
352
358
)
0 commit comments