From 2d6002317a3e548792a811514083f7e1a5fee51f Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Tue, 24 Dec 2024 09:46:02 -0800 Subject: [PATCH 1/3] Update pre-commit (12/2024) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6113db8..020c9d0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0 + rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -16,15 +16,15 @@ repos: - id: check-toml - id: check-added-large-files - - repo: https://github.com/pre-commit/mirrors-prettier - rev: ffb6a759a979008c0e6dff86e39f4745a2d9eac4 # frozen: v3.1.0 + - repo: https://github.com/rbubley/mirrors-prettier + rev: bc7af46104f0f5368b95878decf720f9f00c2559 # frozen: v3.4.2 hooks: - id: prettier files: \.(html|md|yml|yaml|toml) args: [--prose-wrap=preserve] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 1dc9eb131c2ea4816c708e4d85820d2cc8542683 # frozen: v0.5.0 + rev: f0b5944bef86f50d875305821a0ab0d8c601e465 # frozen: v0.8.4 hooks: - id: ruff args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"] From 1e14592a75100055919cde78980c5849f884c7cd Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Tue, 24 Dec 2024 09:46:24 -0800 Subject: [PATCH 2/3] Run linter --- lazy_loader/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lazy_loader/__init__.py b/lazy_loader/__init__.py index fa1a55a..9774159 100644 --- a/lazy_loader/__init__.py +++ b/lazy_loader/__init__.py @@ -15,7 +15,7 @@ import warnings __version__ = "0.5rc0.dev0" -__all__ = ["attach", "load", "attach_stub"] +__all__ = ["attach", "attach_stub", "load"] threadlock = threading.Lock() From 394af12ea6d95cbb46e1693ee6b5369c76e253a0 Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Tue, 24 Dec 2024 09:53:56 -0800 Subject: [PATCH 3/3] Use pre-commit bot --- .github/workflows/lint.yml | 27 --------------------------- .pre-commit-config.yaml | 6 ++++++ 2 files changed, 6 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index b2d6384..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: lint - -on: [push, pull_request] - -jobs: - default: - runs-on: ${{ matrix.os }}-latest - strategy: - matrix: - os: [ubuntu] - python-version: ["3.10"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: "pip" - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install ".[lint]" - - - name: Lint - run: pre-commit run --all-files --show-diff-on-failure --color always diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 020c9d0..dbbf8f2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,12 @@ # Install pre-commit hooks via # pre-commit install +ci: + autofix_prs: false + autofix_commit_msg: | + '[pre-commit.ci 🤖] Apply code format tools to PR' + autoupdate_schedule: quarterly + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0