Skip to content

Get started instructions for contributors

Jinxin Ma edited this page Nov 7, 2023 · 1 revision

The Use of Black Formatter

The python code in the mspass repo uses the Black code style. It also uses the reviewdog in Github Actions to review the formatting issues. Because this setup can get overwhelming when there are too many formatting issues, we recommend running the Black formatter locally before submitting your code. All you need is the install Black and run it. Black requires Python 3.6.0+ with pip installed :

$ pip install black

It is very simple to use black. Run the below command in the terminal.

$ black [file or directory]

This will reformat your code using the Black code style.