mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
Add link to relevant issue for unused variable preview behavior (#12841)
This commit is contained in:
parent
aa0db338d9
commit
2ea79572ae
1 changed files with 1 additions and 0 deletions
|
@ -261,6 +261,7 @@ pub(crate) fn unused_variable(checker: &Checker, scope: &Scope, diagnostics: &mu
|
|||
if (binding.kind.is_assignment()
|
||||
|| binding.kind.is_named_expr_assignment()
|
||||
|| binding.kind.is_with_item_var())
|
||||
// Stabilization depends on resolving https://github.com/astral-sh/ruff/issues/8884
|
||||
&& (!binding.is_unpacked_assignment() || checker.settings.preview.is_enabled())
|
||||
&& binding.is_unused()
|
||||
&& !binding.is_nonlocal()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue