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.
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.The motivation here is to resolve ambiguity about the intended behaviour of this rule. See https://github.com/astral-sh/ruff/pull/8720#issuecomment-1817837253.