Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Add a flag to skip black formatting #51

Description

@orf

In our projects setup.cfg we often add --black via addopts, so our CI always runs with black and any other project specific options that may be required:

[tool:pytest]
addopts = -n auto --black

However there are often cases when developing locally you do not wish to have your tests fail due to black. This poses a problem, because you have to edit your setup.cfg to remove --black and remember to add it back again when committing.

It would be really handy to have a --no-black argument that can be given that overrides the --black flag, if present. So a full invocation might expand to pytest --black --no-black, which would not run black.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions