Skip to content

Commit faa9a4b

Browse files
Upgrade comment and documentation for block comment
See https://github.com/PyCQA/pycodestyle/issues/1034\#issuecomment-962454974
1 parent cc57361 commit faa9a4b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pycodestyle.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,12 +1062,14 @@ def whitespace_before_comment(logical_line, tokens):
10621062
Inline comments should be separated by at least two spaces from the
10631063
statement. They should start with a # and a single space.
10641064
1065-
Each line of a block comment starts with a # and a single space
1066-
(unless it is indented text inside the comment).
1065+
Each line of a block comment starts with a # and one or multiple
1066+
spaces as there can be indented text inside the comment.
10671067
10681068
Okay: x = x + 1 # Increment x
10691069
Okay: x = x + 1 # Increment x
1070-
Okay: # Block comment
1070+
Okay: # Block comments:
1071+
Okay: # - Block comment list
1072+
Okay: #  - Block comment list
10711073
E261: x = x + 1 # Increment x
10721074
E262: x = x + 1 #Increment x
10731075
E262: x = x + 1 # Increment x

0 commit comments

Comments
 (0)