mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-30 23:27:38 +00:00
Fix typo in relative-imports-order option name
This commit is contained in:
parent
3110d342c7
commit
590bec57f4
4 changed files with 4 additions and 4 deletions
|
@ -1024,7 +1024,7 @@
|
|||
"description": "Place \"closer\" imports (fewer `.` characters, most local) before \"further\" imports (more `.` characters, least local).",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"closest-to-further"
|
||||
"closest-to-furthest"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -943,7 +943,7 @@ mod tests {
|
|||
.as_path(),
|
||||
&Settings {
|
||||
isort: isort::settings::Settings {
|
||||
relative_imports_order: RelatveImportsOrder::ClosestToFurther,
|
||||
relative_imports_order: RelatveImportsOrder::ClosestToFurthest,
|
||||
..isort::settings::Settings::default()
|
||||
},
|
||||
src: vec![Path::new("resources/test/fixtures/isort").to_path_buf()],
|
||||
|
|
|
@ -11,7 +11,7 @@ use serde::{Deserialize, Serialize};
|
|||
pub enum RelatveImportsOrder {
|
||||
/// Place "closer" imports (fewer `.` characters, most local) before
|
||||
/// "further" imports (more `.` characters, least local).
|
||||
ClosestToFurther,
|
||||
ClosestToFurthest,
|
||||
/// Place "further" imports (more `.` characters, least local) imports
|
||||
/// before "closer" imports (fewer `.` characters, most local).
|
||||
FurthestToClosest,
|
||||
|
|
|
@ -60,7 +60,7 @@ pub fn cmp_levels(
|
|||
(None, Some(_)) => Ordering::Less,
|
||||
(Some(_), None) => Ordering::Greater,
|
||||
(Some(level1), Some(level2)) => match relative_imports_order {
|
||||
RelatveImportsOrder::ClosestToFurther => level1.cmp(level2),
|
||||
RelatveImportsOrder::ClosestToFurthest => level1.cmp(level2),
|
||||
RelatveImportsOrder::FurthestToClosest => level2.cmp(level1),
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue