From 8012ee4fb9efe4f4050270569c83036f2e653099 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Tue, 20 Jun 2023 16:11:41 +0200 Subject: [PATCH] Use vermin to check Python-compat Vermin checks source code for anything that might be incompatible with older Python versions. This prevents accidentally using a feature from Python 3.10 when we're still supporting 3.8. While tests ideally detect this, there will always be some bits not covered by tests. Using a non-release revision since we need some unreleased changes to deal with zoneinfo backports. See: https://github.com/netromdk/vermin/issues/189 --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5cbb11a89..dd68c5a52 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,3 +24,8 @@ repos: hooks: - id: ruff args: ["--fix"] + - repo: https://github.com/netromdk/vermin + rev: 58fe25f0a3bdaeefe7a2a021bee2938f5465ccde + hooks: + - id: vermin + args: ['-t=3.8-', '--violations']