Skip to content

Commit

Permalink
chore: switch to ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Louis Fuchs committed Mar 13, 2024
1 parent 0f729bd commit 1374c2e
Show file tree
Hide file tree
Showing 21 changed files with 119 additions and 332 deletions.
27 changes: 8 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,13 @@ mypy: poetry-install
pytest: poetry-install ## run pytest
@docker compose exec testing poetry run pytest -vv --cov

.PHONY: check-isort
check-isort: poetry-install ## check isort
@docker compose exec testing poetry run isort --check pyaptly

.PHONY: check-black
check-black: poetry-install ## check black
@docker compose exec testing poetry run black --check pyaptly

.PHONY: check-black
format-black: poetry-install ## format code with black
@docker compose exec testing poetry run black pyaptly

.PHONY: flake8
flake8: poetry-install ## run flake8
@docker compose exec testing poetry run flake8 pyaptly
.PHONY: format
format: poetry-install ## format code with ruff
@docker compose exec testing poetry run ruff format pyaptly

.PHONY: lint-code
lint-code: check-isort check-black flake8 ## check all linters
lint-code: ## check all linters
@docker compose exec testing poetry run ruff check pyaptly

.PHONY: test
test: pytest mypy lint-code ## run all testing
Expand All @@ -82,9 +71,9 @@ entr-pytest: poetry-install ## run pytest with entr
entr-mypy: poetry-install ## run pytest with entr
@docker compose exec testing bash -c "find -name '*.py' | SHELL=bash poetry run entr bash -c 'make local-mypy; echo ---'"

.PHONY: entr-flake8
entr-flake8: poetry-install ## run flake8 with entr
@docker compose exec testing bash -c "find -name '*.py' | SHELL=bash poetry run entr bash -c 'flake8 pyaptly; echo ---'"
.PHONY: entr-lint
entr-lint: poetry-install ## run ruff with entr
@docker compose exec testing bash -c "find -name '*.py' | SHELL=bash poetry run entr bash -c 'ruff check pyaptly; echo ---'"

.PHONY: local-mypy
local-mypy: ## Run mypy as daemon locally (requires local-dev)
Expand Down
Loading

0 comments on commit 1374c2e

Please sign in to comment.