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

E121, E126 false positives #138

Closed
jianli opened this issue Nov 9, 2012 · 2 comments
Closed

E121, E126 false positives #138

jianli opened this issue Nov 9, 2012 · 2 comments
Milestone

Comments

@jianli
Copy link

jianli commented Nov 9, 2012

In pep8 v.1.3.3, these two cases are flagged with

E126 continuation line over-indented for hanging indent

{
    1:
        999999 if True
        else 0,
}
[
    12,  # this is a multi-line inline                                                                                                                                                                           
         # comment                                                                                                                                                                                               
]

and the latter also triggers:

E121 continuation line indentation is not a multiple of four

@florentx
Copy link
Contributor

florentx commented Dec 9, 2012

The first one is better written:

{
    1: (
        999999 if True
        else 0),
}

The second case looks like a bug.

@jianli
Copy link
Author

jianli commented Dec 9, 2012

@florentx what's the rationale behind rewriting the first one with parentheses? The parentheses aren't syntactically necessary, and they don't make the expression more readable either.

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

2 participants