From a31572c54893b30d45ff00af483468fe25d56fac Mon Sep 17 00:00:00 2001 From: antazoey Date: Tue, 10 Dec 2024 07:10:35 +0700 Subject: [PATCH] chore: update lint dependencies (#16) --- .pre-commit-config.yaml | 11 ++++++----- setup.cfg | 2 ++ setup.py | 2 ++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ec132a5..58f9be4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-yaml @@ -10,24 +10,25 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.10.0 hooks: - id: black name: black - repo: https://github.com/pycqa/flake8 - rev: 7.0.0 + rev: 7.1.1 hooks: - id: flake8 + additional_dependencies: [flake8-breakpoint, flake8-print, flake8-pydantic, flake8-type-checking] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.0 + rev: v1.13.0 hooks: - id: mypy additional_dependencies: [types-requests, types-setuptools] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.17 + rev: 0.7.19 hooks: - id: mdformat additional_dependencies: [mdformat-gfm, mdformat-frontmatter, mdformat-pyproject] diff --git a/setup.cfg b/setup.cfg index c362920..a71f67c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,9 @@ [flake8] max-line-length = 100 +ignore = E704,W503,PYD002,TC003,TC006 exclude = venv* .eggs docs build +type-checking-pydantic-enabled = True diff --git a/setup.py b/setup.py index 1675cbc..70e9ed5 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,8 @@ "flake8>=7.1.1,<8", # Style linter "flake8-breakpoint>=1.1.0,<2", # Detect breakpoints left in code "flake8-print>=5.0.0,<6", # Detect print statements left in code + "flake8-pydantic", # For detecting issues with Pydantic models + "flake8-type-checking", # Detect imports to move in/out of type-checking blocks "isort>=5.13.2,<6", # Import sorting linter "mdformat>=0.7.19", # Auto-formatter for markdown "mdformat-gfm>=0.3.5", # Needed for formatting GitHub-flavored markdown