Respect self as positional-only argument in annotation rules (#2927)

This commit is contained in:
Charlie Marsh 2023-02-15 10:25:17 -05:00 committed by GitHub
parent 57a5071b4e
commit cb971d3a48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 4 deletions

View file

@ -225,7 +225,6 @@ fn sorted_child_nodes_inner<'a>(node: &Node<'a>, result: &mut Vec<Node<'a>>) {
for decorator in decorator_list {
result.push(Node::Expr(decorator));
}
// TODO(charlie): Retain order.
for arg in &args.posonlyargs {
if let Some(expr) = &arg.node.annotation {
result.push(Node::Expr(expr));