Remove Empty Nested Block
Documentation Index
Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sourcery refactoring id: remove-empty-nested-block
Section titled “Sourcery refactoring id: remove-empty-nested-block”Description:
Section titled “Description:”Remove nested block which has no effect
Before:
Section titled “Before:”for i in range(3): passAfter:
Section titled “After:”Explanation:
Section titled “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.