ID: py/unnecessary-pass Kind: problem Severity: warning Precision: very-high Tags: - maintainability - useless-code Query suites: - python-security-and-quality.qls
pass statement is only necessary when it is the only statement in a block (the list of statements forming part of a compound statement). This is because the purpose of the
pass statement is to allow empty blocks where they would otherwise be syntactically invalid. If the block already contains other statements then the
pass statement is unnecessary.