From 04a8515e3d5216aa20e63555299cf46983dfcd87 Mon Sep 17 00:00:00 2001 From: ScriptAutomate Date: Mon, 12 Aug 2024 15:21:20 -0500 Subject: [PATCH] Fix and bump pre-commit --- .github/workflows/pre-commit-action.yml | 4 ++-- .pre-commit-config.yaml | 20 ++++++++++---------- requirements/tools.txt | 2 +- tools/ci.py | 1 + tools/images.py | 1 + 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pre-commit-action.yml b/.github/workflows/pre-commit-action.yml index 601304829..d4072aabd 100644 --- a/.github/workflows/pre-commit-action.yml +++ b/.github/workflows/pre-commit-action.yml @@ -18,10 +18,10 @@ jobs: - uses: actions/checkout@v3 - - name: Set up Python 3.9 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: "3.9" + python-version: "3.10" - name: Setup Packer uses: hashicorp-contrib/setup-packer@v2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4dd0e7fb2..a97fff98b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,21 +41,21 @@ repos: # types: [file] # ----- Formatting ----------------------------------------------------------------------------> - - repo: https://github.com/asottile/reorder_python_imports - rev: v3.8.2 - hooks: - - id: reorder-python-imports - args: - - --py38-plus - - --add-import=from __future__ import annotations + # - repo: https://github.com/asottile/reorder_python_imports + # rev: v3.13.0 + # hooks: + # - id: reorder-python-imports + # args: + # - --py310-plus + # - --add-import=from __future__ import annotations - repo: https://github.com/asottile/pyupgrade - rev: v2.37.3 + rev: v3.17.0 hooks: - id: pyupgrade - name: Rewrite Code to be Py3.8+ + name: Rewrite Code to be Py3.10+ args: [ - --py37-plus + --py310-plus ] - repo: https://github.com/psf/black diff --git a/requirements/tools.txt b/requirements/tools.txt index ae1722f88..8d31e45b1 100644 --- a/requirements/tools.txt +++ b/requirements/tools.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --output-file=requirements/tools.txt --resolver=backtracking requirements/tools.in diff --git a/tools/ci.py b/tools/ci.py index d51b66a56..ae3b2f9bf 100644 --- a/tools/ci.py +++ b/tools/ci.py @@ -1,6 +1,7 @@ """ GitHub Actions CI Utilities. """ + from __future__ import annotations import json diff --git a/tools/images.py b/tools/images.py index 093ddd19d..241e48b9e 100644 --- a/tools/images.py +++ b/tools/images.py @@ -1,6 +1,7 @@ """ AWS EC2 AMI Related Commands. """ + from __future__ import annotations import json