Skip to content

black and ruff are now in plain conflict #55

Closed

Description

@benoit74

See openzim/cms#263 (comment)

I've experienced the same on Zimfarm

@rgaudin I remember you mentioned the same kind of issue at some point

Should we adapt our convention and simply drop black now that ruff has made a lot of progress? Is there any added value left in black?

Activity

  1. added
    bug
    question
    on May 4, 2026
  2. rgaudin commented on May 4, 2026

    @rgaudin
    Member

    Every project I touched recently, I've:

    • removed black completely
    • updated tasks.py (removed black step, use ruff check)
    • updated workflows (remove lint-black step)
    • updated pyproject.yaml to used exploded options style ([tool.ruff.format])
    • remove pre-commit hook (been more of a pain than a help)

    I've also been experimenting with just instead of invoke but it's not conclusive.
    Main change is that I've been using uv more but I haven't settled on a new setup so that's why I didn't share those changes yet

  3. benoit74 commented on May 4, 2026

    @benoit74
    CollaboratorAuthor

    I'm still quite attached to pre-commit hooks, it works quite well on my side (besides when black and ruff conflicts obviously). I propose to move this discussion aside. Potential move to uv is already mentioned in #54

  4. benoit74 commented on May 5, 2026

    @benoit74
    CollaboratorAuthor

    @elfkuzco would you like to prepare a PR which drop black from the bootstrap so we are all on the same page regarding what is the new "standard" for Python projects?

  5. benoit74 commented on May 5, 2026

    @benoit74
    CollaboratorAuthor

    I'm still quite attached to pre-commit hooks, it works quite well on my side (besides when black and ruff conflicts obviously). I propose to move this discussion aside.

    I just realize that you were probably speaking only about black pre-commit hook, not all hooks ... sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugquestion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions