forked from M-Labs/nac3
1
0
Fork 0

ignore expressions in class definition body (#26)

This commit is contained in:
Sebastien Bourdeauducq 2021-11-02 23:30:12 +08:00
parent 47f563908a
commit e89bc93b5f
1 changed files with 1 additions and 0 deletions

View File

@ -1396,6 +1396,7 @@ impl TopLevelComposer {
}
}
ast::StmtKind::Pass => {}
ast::StmtKind::Expr { value: _ } => {} // typically a docstring; ignoring all expressions matches CPython behavior
_ => return Err("unsupported statement type in class definition body".into()),
}
}