Add stubs for type params and type aliases
This commit is contained in:
@@ -590,6 +590,7 @@ where
|
||||
keywords,
|
||||
decorator_list,
|
||||
body,
|
||||
type_params: _,
|
||||
range: _,
|
||||
},
|
||||
) => {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -128,6 +128,7 @@ fn create_class_def_stmt(
|
||||
keywords,
|
||||
body,
|
||||
decorator_list: vec![],
|
||||
type_params: vec![],
|
||||
range: TextRange::default(),
|
||||
}
|
||||
.into()
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user