@@ -28,7 +28,7 @@ use ruff_linter::rules::{
2828 pycodestyle, pydoclint, pydocstyle, pyflakes, pylint, pyupgrade, ruff,
2929} ;
3030use ruff_linter:: settings:: types:: {
31- IdentifierPattern , OutputFormat , PreviewMode , PythonVersion , RequiredVersion ,
31+ IdentifierPattern , OutputFormat , PythonVersion , RequiredVersion ,
3232} ;
3333use ruff_linter:: { warn_user_once, RuleSelector } ;
3434use ruff_macros:: { CombineOptions , OptionsMetadata } ;
@@ -1144,30 +1144,22 @@ pub struct Flake8BuiltinsOptions {
11441144 /// List of builtin module names to allow.
11451145 pub builtins_allowed_modules : Option < Vec < String > > ,
11461146 #[ option(
1147- default = r#"true "# ,
1147+ default = r#"false "# ,
11481148 value_type = "bool" ,
1149- example = "builtins-strict-checking = false "
1149+ example = "builtins-strict-checking = true "
11501150 ) ]
11511151 /// Compare module names instead of full module paths.
11521152 ///
11531153 /// Used by [`A005` - `stdlib-module-shadowing`](https://docs.astral.sh/ruff/rules/stdlib-module-shadowing/).
1154- ///
1155- /// In preview mode the default value is `false` rather than `true`.
11561154 pub builtins_strict_checking : Option < bool > ,
11571155}
11581156
11591157impl Flake8BuiltinsOptions {
1160- pub fn into_settings (
1161- self ,
1162- preview : PreviewMode ,
1163- ) -> ruff_linter:: rules:: flake8_builtins:: settings:: Settings {
1158+ pub fn into_settings ( self ) -> ruff_linter:: rules:: flake8_builtins:: settings:: Settings {
11641159 ruff_linter:: rules:: flake8_builtins:: settings:: Settings {
11651160 builtins_ignorelist : self . builtins_ignorelist . unwrap_or_default ( ) ,
11661161 builtins_allowed_modules : self . builtins_allowed_modules . unwrap_or_default ( ) ,
1167- builtins_strict_checking : self
1168- . builtins_strict_checking
1169- // use the old default of true on non-preview
1170- . unwrap_or ( preview. is_disabled ( ) ) ,
1162+ builtins_strict_checking : self . builtins_strict_checking . unwrap_or_default ( ) ,
11711163 }
11721164 }
11731165}
0 commit comments