-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
astral-sh/ruff
#20040Labels
diagnosticsRelated to reporting of diagnostics.Related to reporting of diagnostics.help wantedContributions especially welcomeContributions especially welcomeimportsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics
Description
astral-sh/ruff#18207 added a hint to the unresolved-import diagnostic, suggesting users to correctly configure their venv. While useful, I think we could do better by:
- Adding a note (or sub diagnostic?) explaining where ty searched for said import (which search paths are configured?)
- first-party (if any):
src.root - third-party:
enviroment.python: Ideally, with an information how we detected said environment and how they could customize it - extra search paths (if any)
- standard library (typeshed path)
- first-party (if any):
- Add a note if there's no
third-partyimport search path, hinting users to how they can configure it
I'm not sure how the best rendering looks like. You'll have to do some exploration on how to query and present the information to the user, so that it's useful.
We should also replace the URL to the documentation and use a redirect (I can set this up)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
diagnosticsRelated to reporting of diagnostics.Related to reporting of diagnostics.help wantedContributions especially welcomeContributions especially welcomeimportsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics