diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 234448fd..115577ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,10 +3,11 @@ tests, ensure they build and pass, and ensure that `pylint` and `mypy` are happy with your code. - Install `pip` following their [documentation](https://pip.pypa.io/en/stable/installation/). -- Install development dependencies: `pip install pylint pytest mypy sphinx` +- Install development dependencies: `pip install pylint pytest mypy sphinx black` - Install docs dependencies: `pip install -r docs/requirements.txt` (might need to comment out the build123d line in that file) - Install `build123d` in editable mode from current dir: `pip install -e .` - Run tests with: `python -m pytest` - Build docs with: `cd docs && make html` - Check added files' style with: `pylint ` - Check added files' type annotations with: `mypy ` +- Run black formatter against files' changed: `black --config pyproject.toml ` (where the pyproject.toml is from this project's repository) diff --git a/pyproject.toml b/pyproject.toml index c77ce0e3..514aadb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,3 +61,6 @@ exclude = ["build123d._dev"] [tool.setuptools_scm] write_to = "src/build123d/_version.py" +[tool.black] +target-version = ["py39", "py310", "py311", "py312"] +line-length = 88