-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
setting line-length in pyproject.toml prevents Black from running in vim #1496
Comments
I can fix this, I introduced this regression trying to fix #1458. |
@cooperlees Sounds suspiciously similar, and kudos to @keith's excellent choice of |
Hello, yes the PR above is similar and probably could fix the problems, but
I think it will be better if I fix the source of the issue than putting a
workaround atop of a broken function like the PR above.
…On Mon, Jun 15, 2020, 10:25 AM Erik Reinertsen ***@***.***> wrote:
@cooperlees <https://github.com/cooperlees> Sounds suspiciously similar,
and kudos to @keith <https://github.com/keith>'s excellent choice of
line-length, although 1) my issue was in context of Vim 8.1, not neovim,
and 2) unsure if the exception he refers to is the same as what we're
seeing here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1496 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/APHZN7NIWMGIU6HHRSHHYI3RWYVMDANCNFSM4N5R7FGQ>
.
|
Agree, but should we merge the workaround for now and have your upcoming PR remove it if no longer needed? |
If I don't get a PR ready in 40 minutes, go ahead on merge the workaround. You know what I was trying to do yesterday with pipenv 😂 |
Describe the bug
If
line-length
is set inpyproject.toml
, runningblack
in Vim fails and throws the following error:To Reproduce
The minimum example that reproduces the error for me:
The contents of
pyproject.toml
follow the same syntax as is provided bypyproject.toml
in theblack
repoThe contents of
test.py
:Running
black
in Vim ontest.py
throws the error:I can successfully run
black
ontest.py
outside of vim:or
If I comment out
line-length
inpyproject.toml
, the error we see when callingblack
in Vim goes away:The problem seems to be how
line-length
is parsed and cast byblack
.Expected behavior
black
runs without errors, and utilizes theline-length
value specified inpyproject.toml
.Environment (please complete the following information):
19.10b0
Does this bug also happen on master?
n/a
I get errors running
python -m unittest
but unsure related to this bug:The text was updated successfully, but these errors were encountered: