Code Monkey home page Code Monkey logo

Comments (6)

JelleZijlstra avatar JelleZijlstra commented on June 14, 2024 1

Thanks @RedGuy12, I was just starting to try and minimize when you posted that :)

I used py-spy to figure out what Black is doing, and it's just stuck in the tokenizer:

profile

So it's somewhere in generate_tokens(). That's a big function. I'll spend some time tonight trying to figure it out; in the meantime cc @tusharsadhwani.

from black.

tusharsadhwani avatar tusharsadhwani commented on June 14, 2024 1

@JelleZijlstra using python -m blib2to3.pgen2.tokenize foo.py on the minimal reproduction should show the last token generated, and you can step into the debugger from there onwards.

I'm looking into the issues as well now.

from black.

RedGuy12 avatar RedGuy12 commented on June 14, 2024

Can reproduce on Python 3.11.4 only running Black on the sdk-extension/opentelemetry-sdk-extension-aws/tests folder

from black.

RedGuy12 avatar RedGuy12 commented on June 14, 2024

Minimum reproducible example seems to be:

f'{{\\"kind\\":\\"ConfigMap\\",\\"metadata\\":{{\\"annotations\\":{{}},\\"name\\":\\"cluster-info\\",\\"namespace\\":\\"amazon-cloudwatch\\"}}}}'

Black 24.4.1, stable style, all default options

from black.

JelleZijlstra avatar JelleZijlstra commented on June 14, 2024

Fix in #4331.

from black.

xrmx avatar xrmx commented on June 14, 2024

Thanks!

from black.

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.