Skip to main content

Step 10: Format the codebase

Run formatters to make sure your codebase complies with the code styling rules of the parsomics project.

Explanation

This step is optional but highly recommended. Code formatters help standardize code styling, which is very helpful when you are working with many people. The parsomics team recommends using the black formatter in conjunction with the isort import sorter.

tip

Instead of manually running code formatters from time to time, it is a much better practice to run them automatically while you are editing your files. This ensures you never commit misformatted files to your git repository. Look up how to set that up in your IDE of choice.

Hands on

  1. To run black and isort in your project, execute:
black . && isort .
  1. Stage all changed files and commit them.