diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-11-06 15:02:36 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-11-09 09:21:13 +0100 |
commit | faa9a4bb62b9466e5b0b98288097f1d47bf773f4 (patch) | |
tree | fa57e7db7c7809c47d05ec68df3f7ee644b9ac95 /pycodestyle.py | |
parent | cc57361db5f8458930e612206f0e05d3fc882c93 (diff) | |
download | pep8-faa9a4bb62b9466e5b0b98288097f1d47bf773f4.tar.gz |
Upgrade comment and documentation for block comment
See https://github.com/PyCQA/pycodestyle/issues/1034\#issuecomment-962454974
Diffstat (limited to 'pycodestyle.py')
-rwxr-xr-x | pycodestyle.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index d324544..e0c9e42 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -1062,12 +1062,14 @@ def whitespace_before_comment(logical_line, tokens): Inline comments should be separated by at least two spaces from the statement. They should start with a # and a single space. - Each line of a block comment starts with a # and a single space - (unless it is indented text inside the comment). + Each line of a block comment starts with a # and one or multiple + spaces as there can be indented text inside the comment. Okay: x = x + 1 # Increment x Okay: x = x + 1 # Increment x - Okay: # Block comment + Okay: # Block comments: + Okay: # - Block comment list + Okay: # - Block comment list E261: x = x + 1 # Increment x E262: x = x + 1 #Increment x E262: x = x + 1 # Increment x |