From faa9a4bb62b9466e5b0b98288097f1d47bf773f4 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 6 Nov 2021 15:02:36 +0100 Subject: Upgrade comment and documentation for block comment See https://github.com/PyCQA/pycodestyle/issues/1034\#issuecomment-962454974 --- pycodestyle.py | 8 +++++--- 1 file 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 -- cgit v1.2.1