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;
65
65
use crate :: importer:: { ImportRequest , Importer , ResolutionError } ;
66
66
use crate :: noqa:: NoqaMapping ;
67
67
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;
69
69
use crate :: registry:: { AsRule , Rule } ;
70
70
use crate :: rules:: pyflakes:: rules:: {
71
71
LateFutureImport , ReturnOutsideFunction , YieldOutsideFunction ,
@@ -663,9 +663,7 @@ impl SemanticSyntaxContext for Checker<'_> {
663
663
| SemanticSyntaxErrorKind :: AsyncComprehensionInSyncComprehension ( _)
664
664
| SemanticSyntaxErrorKind :: DuplicateParameter ( _)
665
665
| 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) ;
669
667
}
670
668
}
671
669
}
Original file line number Diff line number Diff line change 7
7
8
8
use crate :: settings:: LinterSettings ;
9
9
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
-
16
10
pub ( crate ) const fn is_py314_support_enabled ( settings : & LinterSettings ) -> bool {
17
11
settings. preview . is_enabled ( )
18
12
}
You can’t perform that action at this time.
0 commit comments