mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 07:04:37 +00:00
Fix defaults for section-order (#4003)
This commit is contained in:
parent
79c47e29ee
commit
064a293b80
1 changed files with 3 additions and 1 deletions
|
@ -348,7 +348,9 @@ impl Default for Settings {
|
|||
impl From<Options> for Settings {
|
||||
fn from(options: Options) -> Self {
|
||||
// Extract any configuration options that deal with user-defined sections.
|
||||
let mut section_order: Vec<_> = options.section_order.unwrap_or_default();
|
||||
let mut section_order: Vec<_> = options
|
||||
.section_order
|
||||
.unwrap_or_else(|| ImportType::iter().map(ImportSection::Known).collect());
|
||||
let known_first_party = options.known_first_party.unwrap_or_default();
|
||||
let known_third_party = options.known_third_party.unwrap_or_default();
|
||||
let known_local_folder = options.known_local_folder.unwrap_or_default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue