-
Notifications
You must be signed in to change notification settings - Fork 190
Open
Labels
bugSomething isn't workingSomething isn't workingimportsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics
Milestone
Description
Summary
My reproduction is maybe not great, but there is a package klayout that contains a .pyi file with > 75,000 lines.
mkdir /tmp/test-repro
cd /tmp/test-repro
uv venv
uv pip install klayout
echo "import klayout.db as kdb
from typing_extensions import reveal_type
def _(x: kdb.LayerInfo, y: kdb.LEFDEFReaderConfiguration):
reveal_type(x)
reveal_type(y)
" > main.py
uv run <red-knot-bin> check main.pyThis gives the following error:
error: lint:invalid-type-form: Variable of type `Never` is not allowed in a type expression
--> /tmp/test-repro/main.py:6:10
|
6 | def _(x: kdb.LayerInfo):
| ^^^^^^^^^^^^^
7 | reveal_type(x)
|
info: revealed-type: Revealed type
--> /tmp/test-repro/main.py:7:5
|
6 | def _(x: kdb.LayerInfo):
7 | reveal_type(x)
| ^^^^^^^^^^^^^^ `Unknown`
|
Found 2 diagnosticsAlso to note LayerInfo is defined at line 36702 and LEFDEFReaderConfiguration at line 35628 (and LEFDEFReaderConfiguration works fine)
Skylion007, JelleZijlstra and utapyngo
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingimportsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics