| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 87.94%. The percentage of expected errors that received a diagnostic held steady at 83.36%. The number of fully passing files held steady at 79/133. |
Sorry, something went wrong.
Memory usage reportMemory usage unchanged ✅ |
Sorry, something went wrong.
| /// without broader reference analysis. Bare local annotations (`x: int`) are also | ||
| /// reported, but only if the symbol is neither bound nor used elsewhere in the scope. | ||
| #[salsa::tracked(returns(ref))] | ||
| pub fn unused_bindings(db: &dyn Db, file: ruff_db::files::File) -> Vec<UnusedBinding> { |
There was a problem hiding this comment.
The function name is a bit misleading now because it also reports declaration only locals, not just bindings. unused_locals would better for the current shape, but I’m leaving the rename for now to keep churn down and until we have defined the scope of any future non-local reporting.
Sorry, something went wrong.
There was a problem hiding this comment.
Alternatively, we could skip declaration only locals from reporting entirely, but for comparison, pyright also reports them.
Sorry, something went wrong.
There was a problem hiding this comment.
I think we should keep reporting unused locals. Renaming it to unused_locals sounds reasonable.
Sorry, something went wrong.
ecosystem-analyzer resultsNo diagnostic changes detected ✅ |
Sorry, something went wrong.
There was a problem hiding this comment.
Nice, thank you
Sorry, something went wrong.
| /// without broader reference analysis. Bare local annotations (`x: int`) are also | ||
| /// reported, but only if the symbol is neither bound nor used elsewhere in the scope. | ||
| #[salsa::tracked(returns(ref))] | ||
| pub fn unused_bindings(db: &dyn Db, file: ruff_db::files::File) -> Vec<UnusedBinding> { |
There was a problem hiding this comment.
I think we should keep reporting unused locals. Renaming it to unused_locals sounds reasonable.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes astral-sh/ty#3322
Summary
Fixes unused-local handling for annotation-only declarations like a: int.
Test Plan
Added tests associated with the fix.