From 75ad6a95fdb920559a3112b35dc8391938216897 Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Tue, 21 Nov 2023 11:28:02 +0100 Subject: [PATCH] testing: add a pair of E303 testcases Add two test cases to verify that pycodestyle correctly flags 2 empty lines in non-toplevel contexts, even outside of functions: one for two empty lines between class methods and one for two empty lines in the indented body of an `if:` statement at toplevel. --- testing/data/E30.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/testing/data/E30.py b/testing/data/E30.py index ebe4e9d2..7ef46890 100644 --- a/testing/data/E30.py +++ b/testing/data/E30.py @@ -75,6 +75,20 @@ def a(): #: +#: E303:6:5 +class xyz: + def a(self): + pass + + + def b(self): + pass +#: E303:5:5 +if True: + a = 1 + + + a = 2 #: E304:3:1 @decorator