Fix the default indent style to tab (#7576)

This commit is contained in:
Micha Reiser 2023-09-21 17:42:55 +02:00 committed by GitHub
parent 7f1456a2c9
commit 6c3378edb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,7 @@ use shellexpand::LookupError;
use strum::IntoEnumIterator; use strum::IntoEnumIterator;
use ruff_cache::cache_dir; use ruff_cache::cache_dir;
use ruff_formatter::{IndentStyle, LineWidth}; use ruff_formatter::LineWidth;
use ruff_linter::line_width::{LineLength, TabSize}; use ruff_linter::line_width::{LineLength, TabSize};
use ruff_linter::registry::RuleNamespace; use ruff_linter::registry::RuleNamespace;
use ruff_linter::registry::{Rule, RuleSet, INCOMPATIBLE_CODES}; use ruff_linter::registry::{Rule, RuleSet, INCOMPATIBLE_CODES};
@ -32,7 +32,7 @@ use ruff_linter::settings::{
use ruff_linter::{ use ruff_linter::{
fs, warn_user, warn_user_once, warn_user_once_by_id, RuleSelector, RUFF_PKG_VERSION, fs, warn_user, warn_user_once, warn_user_once_by_id, RuleSelector, RUFF_PKG_VERSION,
}; };
use ruff_python_formatter::{FormatterSettings, MagicTrailingComma, QuoteStyle}; use ruff_python_formatter::FormatterSettings;
use crate::options::{ use crate::options::{
Flake8AnnotationsOptions, Flake8BanditOptions, Flake8BugbearOptions, Flake8BuiltinsOptions, Flake8AnnotationsOptions, Flake8BanditOptions, Flake8BugbearOptions, Flake8BuiltinsOptions,
@ -300,9 +300,7 @@ impl Configuration {
}) })
.unwrap_or_default(), .unwrap_or_default(),
line_width: LineWidth::from(NonZeroU16::from(self.line_length.unwrap_or_default())), line_width: LineWidth::from(NonZeroU16::from(self.line_length.unwrap_or_default())),
indent_style: IndentStyle::default(), ..FormatterSettings::default()
quote_style: QuoteStyle::default(),
magic_trailing_comma: MagicTrailingComma::default(),
}, },
}) })
} }