Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Oct 30, 2023
1 parent 97914c4 commit 2f564f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/ruff_linter/src/rules/isort/sorting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ type ModuleKey<'a> = (
Option<MemberKey<'a>>,
);

/// Returns a comparable key to capture the desired sorting order for an imported module (e.g.,
/// `foo` in `from foo import bar`).
pub(crate) fn module_key<'a>(
name: Option<&'a str>,
asname: Option<&'a str>,
Expand Down Expand Up @@ -110,6 +112,8 @@ type MemberKey<'a> = (
Option<NatOrdStr<'a>>,
);

/// Returns a comparable key to capture the desired sorting order for an imported member (e.g.,
/// `bar` in `from foo import bar`).
pub(crate) fn member_key<'a>(
name: &'a str,
asname: Option<&'a str>,
Expand Down

0 comments on commit 2f564f8

Please sign in to comment.