-
Notifications
You must be signed in to change notification settings - Fork 307
LSP shows NewType import as unused #2696
Copy link
Copy link
Closed
Labels
help wantedLarger than "good first issue", but still well-defined and ready for someone to pick upLarger than "good first issue", but still well-defined and ready for someone to pick uplanguage-serverIssues specific to our IDE integration rather than type checkingIssues specific to our IDE integration rather than type checking
Metadata
Metadata
Assignees
Labels
help wantedLarger than "good first issue", but still well-defined and ready for someone to pick upLarger than "good first issue", but still well-defined and ready for someone to pick uplanguage-serverIssues specific to our IDE integration rather than type checkingIssues specific to our IDE integration rather than type checking
Type
Fields
Give feedbackNo fields configured for Bug.
Describe the Bug
Python: 3.12
Pyrefly's LSP server reports "Import
NewTypeis unused" even though it is clearly used. The CLI does not report any errors. I'm using pyrefly 0.53.0, but I also observed this in the sandbox (there's a little indicator under the import ofNewTypeand hovering over it shows the error). I'm not using VSCode, justpyrefly lsp.Sandbox Link
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeSIAxAAQDqMUAxrgLYzUAuunAFuwAqkATjDBRS1AMoYcBADS8IcakuqpqxVAHMYAHXQ0A7nxHVSuAK7VGGaoaEQOMBXB6pTM6rHfo1eCxycpMQQ6FoqvoIcPLjohPqUCdQAEjAeHtaWxLDUYDCoHBYiyrhgispoWHj4iEkAtNQA4jCBIqhQdRwQbEHE7Ix8jADWoeF5MDiow-XUAKpw7CIAbvlQAPocwTAAFACUnNyhcH2MgaF5QiKYvfAzMPh9DmzogYaOPLzsAJIAIgCiuXyhWKvAKdnYcAsxGIuCEgW2MEIWkIagCuGYLGyLWc1C0uE6%2BMwolCjggsQUMRWQgULUYuxmtAcTjUWGoQgskVI0VimSJ1EwEBEp3EETMliE1GwQlwhgWQn0%2BjA0pYvVGKkxsMCADkYIYACpbBXoeZpX7UAC81B1%2Bq2210IBNQl%2B9oUoQ4uxAchAAWgcBI5EQVDmXSgjgkYA5pzJ6DgRqJZTAsJYBTW6AsLGwaW2NQi7uodQAfNQ4BwhLVfNRKyJgb4wPatenM2XqMB8ABfe36T0gMgiMSkQhcFhQCg0QR9kWVWT4TLoSBaIoFaPxAxSGDsHgcDjEOCIAD0e97onEhFhWj3MHQe8w6Lge%2BYc4gC6ES9ie9ysLUS1Q0FQ2ByD7zouXQ8rgxAgTGK5kNy6B1FScDRha1D2gAzIQACMABMnboCAbZelMXQrAAYtAMAUFO1T%2BnhQA
(Only applicable for extension issues) IDE Information
No response