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

Vim plugin needs updates for black 19.3b0 #755

Closed
llchan opened this issue Mar 14, 2019 · 2 comments
Closed

Vim plugin needs updates for black 19.3b0 #755

llchan opened this issue Mar 14, 2019 · 2 comments

Comments

@llchan
Copy link
Contributor

llchan commented Mar 14, 2019

With black 19.3b0, I now see a AttributeError: type object 'FileMode' has no attribute 'AUTO_DETECT' when I call :Black in vim. I think black.vim needs some updates to work with the new API.

It may also be a good idea while we're looking at this to spec out a minimal stable API between vim and the black module, since there's really no guarantee that black.py and black.vim are on the same version.

Operating system: Linux
Python version: 3.7.1
Black version: 19.3b0
Does also happen on master: Yes (well, haven't tried, but just based on black.vim code vs black.py)

@gsong
Copy link

gsong commented Mar 15, 2019

For those looking for a workaround for now:

If you need to do anything special to make your virtualenv work and install Black (for example you want to run a version from master), create a virtualenv manually and point g:black_virtualenv to it. The plugin will use it.

Just install black==18.9b0 for now.

tlv pushed a commit to tlv/black that referenced this issue Mar 16, 2019
tlv added a commit to tlv/black that referenced this issue Mar 16, 2019
tlv added a commit to tlv/black that referenced this issue Mar 17, 2019
tlv added a commit to tlv/black that referenced this issue Mar 17, 2019
@pquentin
Copy link
Contributor

Thanks to @tlv and @JelleZijlstra, this was fixed in #766. This issue can now be closed!

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

No branches or pull requests

4 participants