From 45cd2f961810cb448bec79300a31cb13a2f7b7f5 Mon Sep 17 00:00:00 2001 From: Brett Date: Mon, 8 Apr 2024 10:56:27 -0400 Subject: [PATCH] update pre-commit hooks --- .pre-commit-config.yaml | 6 +++--- asdf/_tests/test_schema.py | 8 ++++---- pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 93f7e00c5..bc1c51042 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ exclude: "asdf/(_extern||_jsonschema)/.*" repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-added-large-files - id: check-ast @@ -43,13 +43,13 @@ repos: exclude: "asdf/(extern||_jsonschema)/.*" - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.2.1' + rev: 'v0.3.5' hooks: - id: ruff args: ["--fix"] - repo: https://github.com/psf/black - rev: 24.1.1 + rev: 24.3.0 hooks: - id: black diff --git a/asdf/_tests/test_schema.py b/asdf/_tests/test_schema.py index 6c6ec5b8f..eed9213b6 100644 --- a/asdf/_tests/test_schema.py +++ b/asdf/_tests/test_schema.py @@ -1206,10 +1206,10 @@ def _assert_validation(jsonschema_type, expected_valid): if valid is not expected_valid: description = "valid" if expected_valid else "invalid" - msg = "Expected numpy.{} to be {} against jsonschema type '{}'".format( - type(numpy_value).__name__, - description, - jsonschema_type, + msg = ( + f"Expected numpy.{type(numpy_value).__name__} " + f"to be {description} against jsonschema type " + f"'{jsonschema_type}'" ) raise AssertionError(msg) diff --git a/pyproject.toml b/pyproject.toml index d66eb5584..175f8d211 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -180,7 +180,7 @@ extend-ignore = [ "RUF012", # mutable-class-default (typing related) ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "test_*.py" = ["S101"] "asdf/_tests/_helpers.py" = ["S101"] "compatibility_tests/common.py" = ["S101"]