Skip to content

Knowledge Base: How to apply black formatting #281

@jeremyfowers

Description

@jeremyfowers

We require that all python files in this repo adhere to black formatting. This is enforced with a black check in some CI workflows.

Here's an example of code that is not properly formatted (left) vs. formatted (right):
image

The easiest way to get past this is to enable black formatter in your vscode to format-on-save.

To enable black in your own editor:

  1. Install the extension
    image
  2. Set black as the default formatter
    image
  3. Make sure format-on-save is enabled
    Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions