mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-17 09:00:48 +00:00
Upgrade RustPython (#4900)
This commit is contained in:
parent
4b78141f6b
commit
39a1f3980f
51 changed files with 416 additions and 320 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue