mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 05:20:49 -05:00
Upgrade RustPython (#4900)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::node::AnyNodeRef;
|
||||
use ruff_text_size::TextRange;
|
||||
use rustpython_ast::{
|
||||
Arguments, Expr, Identifier, Ranged, StmtAsyncFunctionDef, StmtFunctionDef, Suite,
|
||||
Arguments, Decorator, Expr, Identifier, Ranged, StmtAsyncFunctionDef, StmtFunctionDef, Suite,
|
||||
};
|
||||
|
||||
/// Enum that represents any python function definition.
|
||||
@@ -65,7 +65,7 @@ impl<'a> AnyFunctionDefinition<'a> {
|
||||
}
|
||||
|
||||
/// Returns the decorators attributing the function.
|
||||
pub fn decorators(self) -> &'a [Expr] {
|
||||
pub fn decorators(self) -> &'a [Decorator] {
|
||||
match self {
|
||||
Self::FunctionDefinition(definition) => &definition.decorator_list,
|
||||
Self::AsyncFunctionDefinition(definition) => &definition.decorator_list,
|
||||
|
||||
Reference in New Issue
Block a user