Git Product home page Git Product logo

Comments (9)

grantjenks avatar grantjenks commented on August 18, 2024 1

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.

grantjenks avatar grantjenks commented on August 18, 2024

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.

deeppunster avatar deeppunster commented on August 18, 2024

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.

deeppunster avatar deeppunster commented on August 18, 2024

from blue.

deeppunster avatar deeppunster commented on August 18, 2024

Oh, this works with black 21.12b0 or later.

from blue.

chrisguillory avatar chrisguillory commented on August 18, 2024

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.

chrisguillory avatar chrisguillory commented on August 18, 2024

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.

warsaw avatar warsaw commented on August 18, 2024

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.

warsaw avatar warsaw commented on August 18, 2024

LGTM

from blue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.