Skip to content

Commit

Permalink
ci!: Add ruff, replacing isort, black, flake8 and its plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed May 27, 2023
1 parent 9307424 commit abe352f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 310 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ jobs:

- name: Install dependencies
run: |
poetry install -E "docs test coverage lint format"
poetry install -E "docs test coverage lint"
poetry run pip install docutils~=${{ matrix.docutils-version }}
- name: Print python versions
run: |
python -V
poetry run python -V
- name: Lint with flake8
run: poetry run flake8
- name: Lint with ruff
run: poetry run ruff .

- name: Lint with mypy
run: poetry run mypy .
Expand Down
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ entr_warn:
@echo "See https://eradman.com/entrproject/ "
@echo "----------------------------------------------------------"

isort:
poetry run isort `${PY_FILES}`

black:
poetry run black `${PY_FILES}`

test:
poetry run py.test $(test)

Expand All @@ -36,11 +30,11 @@ start_docs:
design_docs:
$(MAKE) -C docs design

flake8:
flake8
ruff:
ruff .

watch_flake8:
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) flake8; else $(MAKE) flake8 entr_warn; fi
watch_ruff:
if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) ruff; else $(MAKE) ruff entr_warn; fi

mypy:
poetry run mypy `${PY_FILES}`
Expand Down
Loading

0 comments on commit abe352f

Please sign in to comment.