Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add black config section to pyproject.toml and CONTRIBUTING.md #561

Merged
merged 4 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path/to/file.py>`
- Check added files' type annotations with: `mypy <path/to/file.py>`
- Run black formatter against files' changed: `black --config pyproject.toml <path/to/file.py>` (where the pyproject.toml is from this project's repository)
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading