File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ use crate::docstrings::extraction::ExtractionTarget;
6565use crate :: importer:: { ImportRequest , Importer , ResolutionError } ;
6666use crate :: noqa:: NoqaMapping ;
6767use 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;
6969use crate :: registry:: { AsRule , Rule } ;
7070use 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 }
Original file line number Diff line number Diff line change 77
88use 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-
1610pub ( crate ) const fn is_py314_support_enabled ( settings : & LinterSettings ) -> bool {
1711 settings. preview . is_enabled ( )
1812}
You can’t perform that action at this time.
0 commit comments