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 43ba694 commit b4469c0
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 331 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
cache: 'poetry'

- name: Install dependencies
run: poetry install -E "docs test coverage lint format"
run: poetry install -E "docs test coverage lint"

- 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 @@ -9,12 +9,6 @@ entr_warn:
@echo "See http://entrproject.org/ "
@echo "----------------------------------------------------------"

isort:
poetry run isort `${PY_FILES}`

black:
poetry run black `${PY_FILES}`

test:
poetry run py.test $(test)

Expand Down Expand Up @@ -48,11 +42,11 @@ start_docs:
design_docs:
$(MAKE) -C docs design

flake8:
poetry run flake8
ruff:
poetry run 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 b4469c0

Please sign in to comment.