---
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
---
E301 [*] Expected 1 blank line, found 0
   --> E30.py:478:5
    |
476 |     def func1():
477 |         pass
478 |     def func2():
    |     ^^^
479 |         pass
480 | # end
    |
help: Add missing blank line
    |
477 |         pass
478 +
479 |     def func2():
    |

E301 [*] Expected 1 blank line, found 0
   --> E30.py:489:5
    |
487 |         pass
488 |     # comment
489 |     def fn2():
    |     ^^^
490 |         pass
491 | # end
    |
help: Add missing blank line
    |
487 |         pass
488 +
489 |     # comment
    |

E301 [*] Expected 1 blank line, found 0
   --> E30.py:499:5
    |
498 |     columns = []
499 |     @classmethod
    |     ^
500 |     def cls_method(cls) -> None:
501 |         pass
    |
help: Add missing blank line
    |
498 |     columns = []
499 +
500 |     @classmethod
    |

E301 [*] Expected 1 blank line, found 0
   --> E30.py:511:5
    |
509 |     def method(cls) -> None:
510 |         pass
511 |     @classmethod
    |     ^
512 |     def cls_method(cls) -> None:
513 |         pass
    |
help: Add missing blank line
    |
510 |         pass
511 +
512 |     @classmethod
    |

E301 [*] Expected 1 blank line, found 0
   --> E30.py:526:5
    |
524 |     def bar(self, x: str) -> str:
525 |         ...
526 |     def bar(self, x: int | str) -> int | str:
    |     ^^^
527 |         return x
528 | # end
    |
help: Add missing blank line
    |
525 |         ...
526 +
527 |     def bar(self, x: int | str) -> int | str:
    |

E301 [*] Expected 1 blank line, found 0
   --> E30.py:993:9
    |
991 |     if True:
992 |         print("conditional")
993 |         def test():
    |         ^^^
994 |             pass
995 | # end
    |
help: Add missing blank line
    |
992 |         print("conditional")
993 +
994 |         def test():
    |
