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

Wrong hanging indentation with context managers #1943

Closed
sznekol opened this issue Mar 16, 2018 · 1 comment
Closed

Wrong hanging indentation with context managers #1943

sznekol opened this issue Mar 16, 2018 · 1 comment
Labels

Comments

@sznekol
Copy link

sznekol commented Mar 16, 2018

###` Steps to reproduce

  1. Write an example code:
with context(
        f('adwa')):
    print('adwad')
  1. run pylint on this code

Current behavior

Pylint throws:

C:  2, 0: Wrong hanging indentation (remove 4 spaces).
        f('adwa')):
    |   ^ (bad-continuation)

Expected behavior

There should not by any error.
In the example pylint conflicts with tools like pep8 or pycodestyle (for those this behaviour is expected).
source: https://www.python.org/dev/peps/pep-0008/#indentation

pylint --version output

No config file found, using default configuration

pylint 1.8.1,
astroid 1.6.1
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
@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

3 participants