Upgrade RustPython (#4900)

This commit is contained in:
Micha Reiser 2023-06-08 07:53:14 +02:00 committed by GitHub
parent 4b78141f6b
commit 39a1f3980f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 416 additions and 320 deletions

View file

@ -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,