From e89bc93b5fc7252c47a17e8e65939e1a1e147a67 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 2 Nov 2021 23:30:12 +0800 Subject: [PATCH] ignore expressions in class definition body (#26) --- nac3core/src/toplevel/composer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/nac3core/src/toplevel/composer.rs b/nac3core/src/toplevel/composer.rs index 8676d8877..b34d776aa 100644 --- a/nac3core/src/toplevel/composer.rs +++ b/nac3core/src/toplevel/composer.rs @@ -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()), } }