Skip to content

multiple-leading-hashes-for-block-comment (E266)#

Derived from the pycodestyle linter.

This rule is unstable and in preview. The --preview flag is required for use.

What it does#

Checks if block comments start with a single "#".

Why is this bad?#

Per PEP8, "Block comments generally consist of one or more paragraphs built out of complete sentences, with each sentence ending in a period."

Each line of a block comment should start with a # and a single space.

Example#

### Block comment

Use instead:

# Block comments:
#  - Block comment list
# \xa0- Block comment list