Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E115, Expected an indented block (comment), not detected #1137

Open
kdart-brt opened this issue Mar 29, 2023 · 0 comments
Open

E115, Expected an indented block (comment), not detected #1137

kdart-brt opened this issue Mar 29, 2023 · 0 comments

Comments

@kdart-brt
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant