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

False positive bad-continuation error #638

Closed
pylint-bot opened this issue Sep 15, 2015 · 8 comments
Closed

False positive bad-continuation error #638

pylint-bot opened this issue Sep 15, 2015 · 8 comments
Labels

Comments

@pylint-bot
Copy link

Originally reported by: Tim Leslie (BitBucket: timl, GitHub: @timl?)


PEP 8 states:

The closing brace/bracket/parenthesis on multi-line constructs may either line up under the first non-whitespace character of the last line of list...

The following code, which is valid according to PEP8,

test1 = ["foo",
         "bar",
         "baz"
         ]

gives this error:

C:  4, 0: Wrong continued indentation.
         ]
        |^ (bad-continuation)

I'm currently running the latest pylint installed via pip (1.4.4).

➜  src  pylint --version
No config file found, using default configuration
pylint 1.4.4, 
astroid 1.3.8, common 1.0.2
Python 2.7.8 |Anaconda 1.9.1 (x86_64)| (default, Aug 21 2014, 15:21:46) 
[GCC 4.2.1 (Apple Inc. build 5577)]

The example taken directly from the PEP 8 text does not produce the error:

my_list = [
    1, 2, 3,
    4, 5, 6
    ]

@PCManticore PCManticore added this to the 1.7.0 milestone May 10, 2016
@PCManticore PCManticore modified the milestones: 2.3, 2.2 Jun 17, 2016
@PCManticore PCManticore removed this from the 2.4 milestone Aug 11, 2016
@abendebury
Copy link

Problem persists in pylint 1.6.1.

@PCManticore
Copy link
Contributor

I don't think this was actually solved.

@jocephus
Copy link

jocephus commented Jul 4, 2017

+1

1 similar comment
@jonesambrosi
Copy link

+1

@sethlivingston
Copy link

Still in 1.7.4.

@PCManticore
Copy link
Contributor

The issue is not closed yet, so even if there is a new release, it won't be part of it.

@return42
Copy link

return42 commented Aug 13, 2018

@PCManticore: this bug was already reported by @pylint-bot in 2014. Can we continue the discussion in #289, please?

@Pierre-Sassoulas
Copy link
Member

bad-continuation has been removed in #3571, black or another formatter can help you with this better than Pylint

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

No branches or pull requests

8 participants