Empty lines

Emit extra empty line after control flow statements

Black will always emit an extra empty line after return, raise, break, continue, and yield.

Allow single empty lines inside functions

Allow single and double empty lines at module level

Single and double empty lines on module level left by the original editors, except when they’re within parenthesized expressions.

Ensure empty lines before and after function definitions

  • one line before and after inner functions
  • two lines before and after module-level functions.

Use docstring instead of standalone comments before a function

Empty lines placed between the function definition and any standalone comments that immediately precede the given function.

Original

TODO: add an original and after black for this item

After Black

TODO: add an original and after black for this item

If you want to comment on the entire function, use a docstring or put a leading comment in the function body.