From 1a3c1267bb9cf2c316e20e65d2ecbd9d099ce47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vit=C3=B3rio=20A=2E=20Cavalheiro?= Date: Fri, 10 Oct 2025 10:38:04 -0300 Subject: [PATCH] chore: add pre-commit configuration and update dev dependencies Add pre-commit hooks for code quality checks including trailing whitespace, end-of-file fixes, YAML validation, large file checks, Black formatting, isort imports, Flake8 linting, and Pylint analysis. Update pyproject.toml with corresponding dev dependencies for flake8, pylint, and pre-commit. --- .pre-commit-config.yaml | 29 +++++++++++++++++++++++++++++ pyproject.toml | 3 +++ 2 files changed, 32 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..50cfcce --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + + - repo: https://github.com/psf/black + rev: 25.9.0 + hooks: + - id: black + + - repo: https://github.com/pycqa/isort + rev: 6.1.0 + hooks: + - id: isort + + - repo: https://github.com/pycqa/flake8 + rev: 7.3.0 + hooks: + - id: flake8 + + - repo: https://github.com/pycqa/pylint + rev: v3.3.9 + hooks: + - id: pylint + args: [--rcfile=.pylintrc] diff --git a/pyproject.toml b/pyproject.toml index 73f6dc8..2faf85b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,9 @@ reportlab = "4.2.*" [tool.poetry.group.dev.dependencies] black = "24.4.*" isort = "*" +flake8 = "*" +pylint = "*" +pre-commit = "*" detect-secrets = "1.5.0" [build-system]