Add stubs for type params and type aliases

This commit is contained in:
Zanie 2023-07-17 18:26:42 -05:00
parent 0d4f1d86ad
commit 35cc48a64c
5 changed files with 6 additions and 0 deletions

View File

@ -590,6 +590,7 @@ where
keywords,
decorator_list,
body,
type_params: _,
range: _,
},
) => {

View File

@ -225,6 +225,7 @@ fn function(
decorator_list: vec![],
returns: Some(Box::new(return_type)),
type_comment: None,
type_params: vec![],
range: TextRange::default(),
});
return generator.stmt(&func);
@ -237,6 +238,7 @@ fn function(
decorator_list: vec![],
returns: None,
type_comment: None,
type_params: vec![],
range: TextRange::default(),
});
generator.stmt(&func)

View File

@ -171,6 +171,7 @@ fn create_class_def_stmt(typename: &str, body: Vec<Stmt>, base_class: &Expr) ->
keywords: vec![],
body,
decorator_list: vec![],
type_params: vec![],
range: TextRange::default(),
}
.into()

View File

@ -128,6 +128,7 @@ fn create_class_def_stmt(
keywords,
body,
decorator_list: vec![],
type_params: vec![],
range: TextRange::default(),
}
.into()

View File

@ -42,6 +42,7 @@ impl FormatRule<Stmt, PyFormatContext<'_>> for FormatStmt {
Stmt::ClassDef(x) => x.format().fmt(f),
Stmt::Return(x) => x.format().fmt(f),
Stmt::Delete(x) => x.format().fmt(f),
Stmt::TypeAlias(_) => todo!(),
Stmt::Assign(x) => x.format().fmt(f),
Stmt::AugAssign(x) => x.format().fmt(f),
Stmt::AnnAssign(x) => x.format().fmt(f),