WIP lsystem tools #206
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Black | |
on: [push] | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install isort>=5.10 black>=22.1 | |
- name: Format | |
# Both isort and black have a --check option, but to get the imports sorted and formatted correctly, | |
# I need to run isort _and then_ black, _and then_ check for differences. | |
run: | | |
find generative/ tests/ tools/ -name '*.py' -and -not -path '*geom2graph*' -exec isort {} + | |
find generative/ tests/ tools/ -name '*.py' -and -not -path '*geom2graph*' -exec black --line-length 100 {} + | |
git diff --exit-code |