joslarson / black-vscode

Deprecated: VS Code extension to format Python code using Black
https://marketplace.visualstudio.com/items?itemName=joslarson.black-vscode
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

black version 18.4a0 "outdated" #7

Closed vltr closed 6 years ago

vltr commented 6 years ago

Hello, @joslarson! First, thanks for creating this extension, black is simply awesome. Since I've been rebuilding my dev environment every week, the newest version of black is being flagged as outdated by your extension. I'm working inside a virtualenv and black is only installed there - I already seen #4, I don't think it applies to this case.

$ python -m black --version       
black.py, version 18.4a0

I think the problem would be this line. I don't know if this is related to specific releases of the VSCode extension or the version testing line should be rewritten for major[.minor[.patch]] precedence.

joslarson commented 6 years ago

@vltr Ahh man, this is what I get for trying to be helpful 😛 Thanks for the heads up. I'll try and push out a fix today.

vltr commented 6 years ago

Hah :smile:! But you are helpful, sire! If only OSS developers were too shy to poke one another, sigh :grimacing: ... Anyway, thanks for your quick response :wink:

joslarson commented 6 years ago

@vltr just published v2.0.1. I just decided to rip out the version check. I think I'll add it back in the future, but I need to find out from @ambv what the calver scheme will look like once black moves out of alpha and beta so I can parse it correctly.

ambv commented 6 years ago
assert YY in [18, 19, ...]
assert M in [1-12]
assert N in [0, 1, ...]

f"{YY}.{M}a{N}"  # alpha
f"{YY}.{M}b{N}"  # beta
f"{YY}.{M}c{N}"  # release candidate
f"{YY}.{M}.{N}"  # post final
joslarson commented 6 years ago

@vltr just published v2.0.2 🎉 which added a working "version check" back in. Thanks again for the heads up 👍 and thanks @ambv for the quick response.

vltr commented 6 years ago

Yey! Thanks, @joslarson and @ambv! :tada: