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
Vim plugin formatter fails with error #3318
Comments
@nullromo I believe this is caused by a version mismatch; your system (pip) version is behind your vim plugin version. You could try uninstalling via pip and running We should probably make |
Dataclasses does not support that beyond optional arguments, but there are workarounds 🤮. Let's not do that. Let us know if upgrading solved the issue! I'm also open to catching the type error (?) in the appropriate place and issuing a warning. But it won't help previous releases. |
I know
…On Sun, 9 Oct, 2022, 5:55 pm Felix Hildén, ***@***.***> wrote:
Dataclasses does not support that beyond optional arguments, but there
are workarounds 🤮
<https://github.com/felix-hilden/tekore/blob/master/tekore/_model/serialise.py#L193>.
Let's not do that.
Let us know if upgrading solved the issue! I'm also open to catching the
type error (?) in the appropriate place and issuing a warning. But it won't
help previous releases.
—
Reply to this email directly, view it on GitHub
<#3318 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYJ4LEZFLLBJKGNUZV2C43DWCK2R7ANCNFSM6AAAAAAQ774YLA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I ran both Old Black version:
New Black version:
Commit hash from the directory where vim installed the Black plugin:
(same as current main branch head) |
The vim plugin manages its own black installation by using its own virtual environment. Upgrading the system black will do nothing. Have you tried |
tl;dr it's working. thanks! 🎉This was the output from
Yes, the formatting looks like that. Here it is in a readable form:
And here's the output from
so yes, it looks like the vim plugin version does not line up with the vim plugin's Black version, which does not line up with the system's Black version. I went into
Then I did sudo apt-get install python3.8-venv
sudo apt-get install python3.10-venv and re-did the whole process of uninstalling and removing, then reinstalling. Finally, I got this message from
Now everything is working again. Not sure why I had to do this, seeing as Black used to work just fine on my machine, but at least now I know how to fix it next time :) |
However, maybe it's worth mentioning that the message
probably shouldn't print out when |
Feel free to open a new issue or rename & update the description of this issue (and reopen it). |
Describe the bug
When I try to use vim to run Black, I get the following message:
This happens when calling
:Black
from a python buffer and then the code does not format.To Reproduce
Use this
.vimrc
:and open vim with
vim -u <path to small .vimrc>
. Then run:PlugInstall
to install the plugin. Then open a python file and run:Black
.Expected behavior
The plugin should function properly and format the file in the buffer.
Environment
Additional context
I tried uninstalling and reinstalling the plugin, and I also tried uninstalling and reinstalling Black via pip.
The text was updated successfully, but these errors were encountered: