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

E131: inconsistent reporting when comment present on initial line #1055

Open
fofoni opened this issue Feb 15, 2022 · 0 comments
Open

E131: inconsistent reporting when comment present on initial line #1055

fofoni opened this issue Feb 15, 2022 · 0 comments

Comments

@fofoni
Copy link

fofoni commented Feb 15, 2022

This (correctly, IMO) produces no warnings:

import foo

dct = {
    'key':
        foo.yadayada() if foo.some_condition()  # raises no warnings
        else foo.blablebli()
}

On the other hand, simply adding a comment on the 'key' line makes it raise E131 on the two most indented lines:

import foo

dct = {
    'key':  # some comment added
        foo.yadayada() if foo.some_condition()  # now, this raises E131
        else foo.blablebli()
}

Using pycodestyle 2.8.0.

@asottile asottile changed the title inconsistent reporting of E131 E131: inconsistent reporting when comment present on initial line Feb 15, 2022
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