Skip to content

Commit

Permalink
Drop Python 3.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb committed Apr 28, 2024
1 parent 6825228 commit 9f5223c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
24 changes: 12 additions & 12 deletions project/.pre-commit-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
minimum_pre_commit_version: 2.4.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: {{ "v4.4.0" if python_requires < (3, 8) else "v4.6.0" }}
rev: v4.6.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace.
Expand Down Expand Up @@ -37,7 +37,7 @@ repos:

- repo: https://github.com/s0undt3ch/salt-rewrite
# Automatically rewrite code with known rules
rev: {{ "2.2.0" if python_requires < (3, 8) else "2.5.2" }}
rev: 2.5.2
hooks:
- id: salt-rewrite
alias: rewrite-docstrings
Expand All @@ -47,7 +47,7 @@ repos:

- repo: https://github.com/s0undt3ch/salt-rewrite
# Automatically rewrite code with known rules
rev: {{ "2.2.0" if python_requires < (3, 8) else "2.5.2" }}
rev: 2.5.2
hooks:
- id: salt-rewrite
alias: rewrite-tests
Expand All @@ -56,7 +56,7 @@ repos:
args: [--silent, -E, fix_docstrings]

- repo: https://github.com/asottile/pyupgrade
rev: {{ "v2.37.2" if python_requires < (3, 8) else "v3.15.2" }}
rev: v3.15.2
hooks:
- id: pyupgrade
name: Rewrite Code to be Py{{ python_requires[:2] | join(".") }}+
Expand All @@ -66,7 +66,7 @@ repos:
exclude: src/{{ package_namespace_path }}{{ package_name }}/version.py

- repo: https://github.com/asottile/reorder_python_imports
rev: {{ "v3.10.0" if python_requires < (3, 8) else "v3.12.2" }}
rev: v3.12.2
hooks:
- id: reorder-python-imports
args: [
Expand All @@ -75,33 +75,33 @@ repos:
exclude: src/{{ package_namespace_path }}{{ package_name }}/version.py

- repo: https://github.com/psf/black
rev: {{ "22.6.0" if python_requires < (3, 8) else "24.2.0" }}
rev: 24.2.0
hooks:
- id: black
args: [-l 100]
exclude: src/{{ package_namespace_path }}{{ package_name }}/version.py

- repo: https://github.com/adamchainz/blacken-docs
rev: {{ "v1.12.1" if python_requires < (3, 8) else "1.16.0" }}
rev: 1.16.0
hooks:
- id: blacken-docs
args: [--skip-errors]
files: ^(docs/.*\.rst|src/{{ package_namespace_path }}{{ package_name }}/.*\.py)$
additional_dependencies:
- black=={{ "22.6.0" if python_requires < (3, 8) else "24.2.0" }}
- black==24.2.0
# <---- Formatting -----------------------------------------------------------------------------

# ----- Security ------------------------------------------------------------------------------>
- repo: https://github.com/PyCQA/bandit
rev: "{{ "1.7.4" if python_requires < (3, 8) else "1.7.8" }}"
rev: 1.7.8
hooks:
- id: bandit
alias: bandit-salt
name: Run bandit against the code base
args: [--silent, -lll, --skip, B701]
exclude: src/{{ package_namespace_path }}{{ package_name }}/version.py
- repo: https://github.com/PyCQA/bandit
rev: "{{ "1.7.4" if python_requires < (3, 8) else "1.7.8" }}"
rev: 1.7.8
hooks:
- id: bandit
alias: bandit-tests
Expand All @@ -112,7 +112,7 @@ repos:

# ----- Code Analysis ------------------------------------------------------------------------->
- repo: https://github.com/saltstack/mirrors-nox
rev: {{ "v2021.6.12" if python_requires < (3, 8) else "v2022.11.21" }}
rev: v2022.11.21
hooks:
- id: nox
alias: lint-src
Expand All @@ -125,7 +125,7 @@ repos:
- --

- repo: https://github.com/saltstack/mirrors-nox
rev: {{ "v2021.6.12" if python_requires < (3, 8) else "v2022.11.21" }}
rev: v2022.11.21
hooks:
- id: nox
alias: lint-tests
Expand Down
4 changes: 0 additions & 4 deletions project/pyproject.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ docs = [
"myst_parser",
"furo",
"sphinx-inline-tabs",
{%- if python_requires < (3, 8) %}
"furo<=2023.03.27; python_version < '3.8'",
"importlib_metadata; python_version < '3.8'",
{%- endif %}
]
docsauto = ["sphinx-autobuild"]
lint = [
Expand Down

0 comments on commit 9f5223c

Please sign in to comment.