E115, Expected an indented block (comment), not detected #1137
Open
Description
According to PEP-8 on block styles, it merely says:
Block comments generally apply to some (or all) code that follows them, and are indented to the same level as that code.
The existing E115 is supposed to check this. However, the following test code does not trigger it:
class SomeBase:
pass
class SomeClass(SomeBase):
def method(self, arg):
if not arg:
return "arg is false"
# Will return true on truthy
return "arg is true"
I think that should be caught. It does cause a problem with building documentation with Sphinx that includes source code snippets. The generated RST has the de-dented line signalling the end of the code block.
Thanks!
Metadata
Assignees
Labels
No labels