From 1ceb7fc46326f54289a8eb0e23039696a26c5c06 Mon Sep 17 00:00:00 2001 From: JasonGrace2282 Date: Wed, 15 May 2024 07:24:40 -0400 Subject: [PATCH] fix pre-commit (add pyupgrade/blanket noqa) --- .pre-commit-config.yaml | 12 +++++++++++- tin/settings/__init__.py | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68edd051..ec3a609a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,13 +10,23 @@ repos: name: Validate Python - id: trailing-whitespace - id: mixed-line-ending - args: ["--fix=lf"] - repo: https://github.com/codespell-project/codespell rev: v2.2.5 hooks: - id: codespell files: ^.*\.(py|md|rst)$ args: ["-L", "num,ans", "-w"] + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: python-check-blanket-noqa + name: Precision flake ignores + - repo: https://github.com/asottile/pyupgrade + rev: v3.15.2 + hooks: + - id: pyupgrade + name: Update code to new python versions + args: [--py38-plus] - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.3.5 hooks: diff --git a/tin/settings/__init__.py b/tin/settings/__init__.py index f3ffec88..65107f4b 100644 --- a/tin/settings/__init__.py +++ b/tin/settings/__init__.py @@ -318,6 +318,6 @@ QUIZ_ISSUE_THRESHOLD = 5 try: - from .secret import * # noqa + from .secret import * # noqa: F403 except ImportError: pass