id: no-unnecessary-pass
language: python
severity: hint
message: Remove `pass` when the block has other statements.
note: |
`pass` is only needed as a placeholder when a block would otherwise be
empty. When the block already contains other statements, `pass` is
dead code and should be removed.
rule:
kind: pass_statement
inside:
kind: block
has:
kind: expression_statement
stopBy: end
files:
- "**/*.py"
- "!tests/**"