mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-15 16:10:38 +00:00
Remove unnecessary path prefixes (#4492)
This commit is contained in:
parent
a8d080c825
commit
e8e66f3824
13 changed files with 252 additions and 324 deletions
|
@ -915,7 +915,7 @@ impl<'a> From<&'a Stmt> for ComparableStmt<'a> {
|
|||
body: body.iter().map(Into::into).collect(),
|
||||
decorator_list: decorator_list.iter().map(Into::into).collect(),
|
||||
returns: returns.as_ref().map(Into::into),
|
||||
type_comment: type_comment.as_ref().map(std::string::String::as_str),
|
||||
type_comment: type_comment.as_ref().map(String::as_str),
|
||||
},
|
||||
Stmt::AsyncFunctionDef(ast::StmtAsyncFunctionDef {
|
||||
name,
|
||||
|
@ -931,7 +931,7 @@ impl<'a> From<&'a Stmt> for ComparableStmt<'a> {
|
|||
body: body.iter().map(Into::into).collect(),
|
||||
decorator_list: decorator_list.iter().map(Into::into).collect(),
|
||||
returns: returns.as_ref().map(Into::into),
|
||||
type_comment: type_comment.as_ref().map(std::string::String::as_str),
|
||||
type_comment: type_comment.as_ref().map(String::as_str),
|
||||
},
|
||||
Stmt::ClassDef(ast::StmtClassDef {
|
||||
name,
|
||||
|
@ -967,7 +967,7 @@ impl<'a> From<&'a Stmt> for ComparableStmt<'a> {
|
|||
}) => Self::Assign {
|
||||
targets: targets.iter().map(Into::into).collect(),
|
||||
value: value.into(),
|
||||
type_comment: type_comment.as_ref().map(std::string::String::as_str),
|
||||
type_comment: type_comment.as_ref().map(String::as_str),
|
||||
},
|
||||
Stmt::AugAssign(ast::StmtAugAssign {
|
||||
target,
|
||||
|
|
|
@ -295,8 +295,8 @@ impl OneIndexed {
|
|||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Display for OneIndexed {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
impl fmt::Display for OneIndexed {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
std::fmt::Debug::fmt(&self.0.get(), f)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue