Skip to content

Commit

Permalink
chore: upgrade dev tooling (#7)
Browse files Browse the repository at this point in the history
* chore: replace setup.py with poetry

* chore: Update pre-commit config
  • Loading branch information
Barabazs authored May 3, 2024
1 parent dfff709 commit 8346999
Show file tree
Hide file tree
Showing 6 changed files with 650 additions and 38 deletions.
23 changes: 20 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,29 @@ fail_fast: true

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer

- id: no-commit-to-branch
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 24.4.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.0
hooks:
# Use isort for sorting imports.
- id: isort
additional_dependencies: ["toml"]
- repo: local
hooks:
- id: poetry-check
name: Poetry check
description:
Validates the content of the pyproject.toml file and its consistency
with the poetry.lock file.
entry: poetry check
language: system
pass_filenames: false
files: pyproject.toml
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
help:
@echo "lint - lint code"
@echo "install-dev - install all dependencies for development"

install-dev:
poetry install --with dev --all-extras

lint:
@ERROR=0; \
poetry run isort archivooor || ERROR=1; \
poetry run black archivooor || ERROR=1; \
poetry run pydocstyle archivooor || ERROR=1; \
poetry run pylint archivooor || ERROR=1; \
poetry run mypy archivooor || ERROR=1; \
poetry run pre-commit run --all || ERROR=1; \
exit $$ERROR
File renamed without changes.
Loading

0 comments on commit 8346999

Please sign in to comment.