Skip to content

Commit 6de8755

Browse files
committed
remove preview gating
1 parent 50fa555 commit 6de8755

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

crates/ruff_linter/src/checkers/ast/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ use crate::docstrings::extraction::ExtractionTarget;
6565
use crate::importer::{ImportRequest, Importer, ResolutionError};
6666
use crate::noqa::NoqaMapping;
6767
use crate::package::PackageRoot;
68-
use crate::preview::{is_semantic_errors_enabled, is_undefined_export_in_dunder_init_enabled};
68+
use crate::preview::is_undefined_export_in_dunder_init_enabled;
6969
use crate::registry::{AsRule, Rule};
7070
use crate::rules::pyflakes::rules::{
7171
LateFutureImport, ReturnOutsideFunction, YieldOutsideFunction,
@@ -663,9 +663,7 @@ impl SemanticSyntaxContext for Checker<'_> {
663663
| SemanticSyntaxErrorKind::AsyncComprehensionInSyncComprehension(_)
664664
| SemanticSyntaxErrorKind::DuplicateParameter(_)
665665
| SemanticSyntaxErrorKind::NonlocalDeclarationAtModuleLevel => {
666-
if is_semantic_errors_enabled(self.settings) {
667-
self.semantic_errors.borrow_mut().push(error);
668-
}
666+
self.semantic_errors.borrow_mut().push(error);
669667
}
670668
}
671669
}

crates/ruff_linter/src/preview.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
88
use crate::settings::LinterSettings;
99

10-
// https://github.com/astral-sh/ruff/issues/17412
11-
// https://github.com/astral-sh/ruff/issues/11934
12-
pub(crate) const fn is_semantic_errors_enabled(settings: &LinterSettings) -> bool {
13-
settings.preview.is_enabled()
14-
}
15-
1610
pub(crate) const fn is_py314_support_enabled(settings: &LinterSettings) -> bool {
1711
settings.preview.is_enabled()
1812
}

0 commit comments

Comments
 (0)