implicit-namespace-package
(INP001
) - error is not reported in the language server when a package is nested inside an implicit namespace package #14752
Open
Description
opened on Dec 3, 2024
the scenario covered by #14236 seems to work in the CLI, but the error is not reported in vscode.
i'm not sure if this is an issue with the vscode extension or the language server, but the language server seems to not be sending any diagnostics so i assume that's where the issue is.
i'm using the same version of ruff in both the CLI and the vscode extension: 0.8.1
project structure
foo/
├── __init__.py
└── bar/
└── baz/
└── __init__.py
cli output
> ruff check --no-cache foo
foo\bar\baz\__init__.py:1:1: INP001 File `foo\bar\baz\__init__.py` declares a package, but is nested under an implicit namespace package. Add an `__init__.py` to `foo\bar`.
Found 1 error.
vscode output
2024-12-03 20:47:55.022 [info] [Trace - 8:47:55 PM] Sending request 'textDocument/diagnostic - (175)'.
2024-12-03 20:47:55.022 [info] Params: {
"identifier": "Ruff",
"textDocument": {
"uri": "file:///c%3A/Users/user/project/foo/bar/baz/__init__.py"
}
}
2024-12-03 20:47:55.028 [info] [Trace - 8:47:55 PM] Received response 'textDocument/diagnostic - (175)' in 6ms.
2024-12-03 20:47:55.028 [info] Result: {
"items": [],
"kind": "full"
}
Activity