mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
Restore RUF011 documentation (#9758)
For consistency with other redirected rules as in https://github.com/astral-sh/ruff/pull/9755 Follow-up to #9428
This commit is contained in:
parent
994514d686
commit
836d2eaa01
6 changed files with 66 additions and 10 deletions
|
@ -44,6 +44,20 @@ impl From<Linter> for RuleSelector {
|
|||
}
|
||||
}
|
||||
|
||||
impl Ord for RuleSelector {
|
||||
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
|
||||
// TODO(zanieb): We ought to put "ALL" and "Linter" selectors
|
||||
// above those that are rule specific but it's not critical for now
|
||||
self.prefix_and_code().cmp(&other.prefix_and_code())
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialOrd for RuleSelector {
|
||||
fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
|
||||
Some(self.cmp(other))
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for RuleSelector {
|
||||
type Err = ParseError;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue