Skip to content

Remove Empty Nested Block

Sourcery refactoring id: remove-empty-nested-block

Description:

Remove nested block which has no effect

Before:

for i in range(3):
    pass

After:


Explanation:

An if or for which is empty and has no effect should not be present in the code. It clutters things up and makes it harder to see what the code is really doing.