-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongtopic-error-reportingHow we report errorsHow we report errorstopic-paramspecPEP 612, ParamSpec, ConcatenatePEP 612, ParamSpec, Concatenate
Description
from typing import List, ParamSpec
P = ParamSpec('P')
def foo(x: List[P]) -> None: ...test.py:5:13: error: Invalid location for ParamSpec "P" [misc]
test.py:5:18: note: You can use ParamSpec as the first argument to Callable, e.g., 'Callable[P, int]'
Found 2 errors in 1 file (checked 1 source file)
Column 13 is the L in List. The error and the note don't match up.
Notice that the error and the note specify different column numbers.
An internal error with the correct column number is generated, but is removed as a duplicate.
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-error-reportingHow we report errorsHow we report errorstopic-paramspecPEP 612, ParamSpec, ConcatenatePEP 612, ParamSpec, Concatenate