mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Use fake rules for testing deprecation and removal infrastructure (#9752)
Updates #9689 and #9691 to use rule testing infrastructure from #9747
This commit is contained in:
parent
e5008ca714
commit
46c0937bfa
5 changed files with 235 additions and 83 deletions
|
@ -909,7 +909,15 @@ impl LintConfiguration {
|
|||
}
|
||||
|
||||
// Check if the selector is empty because preview mode is disabled
|
||||
if selector.rules(&PreviewOptions::default()).next().is_none() {
|
||||
if selector.rules(&preview).next().is_none()
|
||||
&& selector
|
||||
.rules(&PreviewOptions {
|
||||
mode: PreviewMode::Enabled,
|
||||
require_explicit: preview.require_explicit,
|
||||
})
|
||||
.next()
|
||||
.is_some()
|
||||
{
|
||||
ignored_preview_selectors.insert(selector);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue