(馃悶) Wrong column number for "Invalid location for ParamSpec" 路 Issue #12274 路 python/mypy (original) (raw)

@KotlinIsland

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.