Comments (9)
I believe #67 brought in support for Python 3.10 and the match
statement. If you want, you can try formatting with HEAD and seeing how the diffs look.
Fyi @warsaw who was also going to check diffs.
from blue.
It’s our goal to stay current with Black as new Python features are supported. Thanks for pointing out the issue. Could you share a snippet of code that black currently formats but blue does not?
from blue.
Certainly. Here is a match statement that black will handle if "--target-version py310" is specified:
order = 1
match order:
case 1:
print("Matched number one")
case 2:
print("Matched number two")
case _:
print("No match")
And the output is:
Matched number one
from blue.
from blue.
Oh, this works with black 21.12b0
or later.
from blue.
Is there any update on this? Perhaps there's a workaround available? We are on Python 3.10 and would like to use the new match
statement /w blue
. Thanks!
from blue.
Thanks! We are using #67 successfully and our diffs look good. Any idea when this new version might be released? (for now we install blue
from commit hash).
from blue.
Thanks for the confirmation @chrisguillory - I'll do some quick checks myself and tag a new release. Automation should take it from there.
from blue.
LGTM
from blue.
Related Issues (20)
- [docs request] Examples of pyproject.toml and setup.cfg
- [Question] Active? HOT 2
- 0x and 0b case
- Coverage requirement fails
- Exclude not workin pyproject.toml
- error: cannot format main.py: Cannot parse: 66:21 HOT 1
- blue is incompatible with flake8 v5 HOT 9
- Unable to run Blue formatting HOT 4
- Don't expand brackets
- How to properly use Blue in GitHub Actions? HOT 1
- https://iblueit.dev/ is broken due to missing resources HOT 1
- Don't bind specific versions of `black`, monkey patch methods on `ast` level
- Continuation lines defined by extra indentation HOT 1
- Comply with PEP-8 for indentation of parameters in function definition HOT 3
- leave function-scope imports alone
- [docs request] Adding example pre-commit config to README
- Is this repository still active? The last update was 9 month ago HOT 4
- Doc: how to use blue with vscode? HOT 1
- Vim Plugin for blue HOT 5
- blue changes `%autoreload 2` in jupyter ntoebooks to random hex
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blue.