From b4d94b9843eebf544c61782000f7f178373c827d Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Tue, 3 Sep 2024 08:40:26 +0200 Subject: [PATCH 1/2] Globally exclude `Baseline` directories from pre-commit hooks Users might want to add e.g., YAML files in baselines which we might have triggered on via other hooks which did not explicitly exclude them. Instead globally exclude any `Baseline` directory from linting. --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70cbc18..db0a85e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ +exclude: .*/Baseline + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: - id: trailing-whitespace - exclude: .*/Baseline - id: end-of-file-fixer - exclude: .*/Baseline - id: check-yaml - id: check-added-large-files From 3115f0b1c4d3ff2f9409186975059ce8b57f0315 Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Tue, 3 Sep 2024 08:42:49 +0200 Subject: [PATCH 2/2] Bump pre-commit hooks --- .pre-commit-config.yaml | 14 +++++++------- __init__.py | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db0a85e..fa1b161 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ exclude: .*/Baseline repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -16,30 +16,30 @@ repos: args: [-w, -i, '4', -ci] - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.9.0.6 + rev: v0.10.0.1 hooks: - id: shellcheck - repo: https://github.com/PyCQA/pylint.git - rev: v3.0.1 + rev: v3.2.7 hooks: - id: pylint additional_dependencies: - zkg - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.11.0 + rev: v2.14.0 hooks: - id: pretty-format-yaml args: [--autofix, --indent, '2'] - repo: https://github.com/psf/black - rev: 23.10.1 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.17.0 hooks: - id: pyupgrade args: [--py37-plus] @@ -65,6 +65,6 @@ repos: - vermin - repo: https://github.com/crate-ci/typos - rev: v1.16.22 + rev: v1.24.3 hooks: - id: typos diff --git a/__init__.py b/__init__.py index 4af101f..61f8302 100644 --- a/__init__.py +++ b/__init__.py @@ -5,6 +5,7 @@ for details. """ + from datetime import date import glob import os