Skip to content

Fix ValueError when formatting if continuation lines are incorrectly indented when using autopep8 #829

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

Merged
merged 2 commits into from
Jul 2, 2020

Conversation

lordsutch
Copy link
Contributor

This patch temporarily re-monkey-patches the _checks in pycodestyle to use autopep8's checker, and then patches things back when done. This should fix #771

NB: the patching shouldn't need to be conditional (unlike in pycodestyle_lint.py) since autopep8 always requires pycodestyle to work.

the _checks in pycodestyle to use autopep8's checker. Should fix #771.
@palantirtech
Copy link
Member

Thanks for your interest in palantir/python-language-server, @lordsutch! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@ccordoba12
Copy link
Contributor

Thanks a lot for your contribution! Could you add a test for this?

@lordsutch
Copy link
Contributor Author

Hmm, I'm not sure why the python 3 test is failing with test/test_language_server.py::test_exit_with_parent_process_died FAILED; that step runs fine on my Mac OS machine.

Copy link
Contributor

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lordsutch!

@ccordoba12 ccordoba12 added this to the 0.34.1 milestone Jul 2, 2020
@ccordoba12 ccordoba12 merged commit 2faf957 into palantir:develop Jul 2, 2020
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

Successfully merging this pull request may close these issues.

Formatting hanging indents raises ValueError
3 participants