Giter Site home page Giter Site logo

[idea] Integrate with pre-commit about black_out HOT 7 OPEN

sloria avatar sloria commented on June 1, 2024
[idea] Integrate with pre-commit

from black_out.

Comments (7)

webknjaz avatar webknjaz commented on June 1, 2024

@sloria pre-commit's hooks (I assume you're talking about pre-commit.com tool) don't always do changes, that's why I guess it's hard to use it for such a thing.

from black_out.

sloria avatar sloria commented on June 1, 2024

@webknjaz Yes, I was referring to pre-commit.com. I'm not sure what you mean--running pre-commit run --all-files will modify files in place.

from black_out.

webknjaz avatar webknjaz commented on June 1, 2024

Err.. not exactly. It will run hooks and those hooks may modify files if they are programmed to do so. Most of "hooks" there are linters, not autoformatters. Which conflicts with your statement a bit.

from black_out.

sloria avatar sloria commented on June 1, 2024

I don't see that as a blocker to implementing this feature, though.

It is common to run black through pre-commit, but not all projects use the black coding style. marshmallow, for example, currently uses pre-commit for formatting but does not use black: https://github.com/marshmallow-code/marshmallow/blob/dev/.pre-commit-config.yaml

from black_out.

webknjaz avatar webknjaz commented on June 1, 2024

Okay, I see where you're going with this. Makes sense.

from black_out.

Mariatta avatar Mariatta commented on June 1, 2024

Sorry for the late in responding. I've been out of open source for the past two months, and just saw this now.

So I've created this bot because I don't want to bother with pre-commit and all that, but I think there was another suggestion in the past for integrating additional services other than black. I will think more about this.

from black_out.

sloria avatar sloria commented on June 1, 2024

No worries!

Yeah, it makes sense why you'd want to use a bot for formatting. Integrating with pre-commit would generalize the tool a beyond black (and even beyond Python).

from black_out.

Related Issues (9)

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.