Skip to content

Commit

Permalink
Merge pull request #1781 from braingram/update_precommit
Browse files Browse the repository at this point in the history
update pre-commit hooks
  • Loading branch information
braingram committed Apr 8, 2024
2 parents 694494d + 45cd2f9 commit 067e392
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions asdf/_tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 067e392

Please sign in to comment.