Skip to content

Commit

Permalink
Merge pull request #1627 from asdf-format/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
braingram authored Sep 8, 2023
2 parents ce5d3dd + 8125764 commit cee306e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
exclude: "asdf/(extern||_jsonschema)/.*"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.282'
rev: 'v0.0.287'
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -54,11 +54,11 @@ repos:
- id: black

- repo: https://github.com/asottile/blacken-docs
rev: '1.15.0'
rev: '1.16.0'
hooks:
- id: blacken-docs

- repo: https://github.com/abravalheri/validate-pyproject
rev: "v0.13"
rev: "v0.14"
hooks:
- id: validate-pyproject
4 changes: 2 additions & 2 deletions asdf/_tests/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ def __init__(self, clown="", the_meaning=0, anyof=None, allof=None, oneof=None,
self.patt = {}
for key in kw:
if re.search("^S_", key):
if type(kw[key]) != str:
if not isinstance(kw[key], str):
msg = "S_ pattern object must be a string"
raise ValueError(msg)
self.patt[key] = kw[key]
if re.search("^I_", key):
if type(kw[key]) != int:
if not isinstance(kw[key], int):
msg = "I_ pattern object must be an int"
raise ValueError(msg)
self.patt[key] = kw[key]
Expand Down
28 changes: 9 additions & 19 deletions asdf/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,26 +442,16 @@ def convert_unknown_ndarray_subclasses(self, value):
def __repr__(self):
return (
"<AsdfConfig\n"
" array_inline_threshold: {}\n"
" all_array_storage: {}\n"
" all_array_compression: {}\n"
" all_array_compression_kwargs: {}\n"
" convert_unknown_ndarray_subclasses: {}\n"
" default_version: {}\n"
" io_block_size: {}\n"
" legacy_fill_schema_defaults: {}\n"
" validate_on_read: {}\n"
f" array_inline_threshold: {self.array_inline_threshold}\n"
f" all_array_storage: {self.all_array_storage}\n"
f" all_array_compression: {self.all_array_compression}\n"
f" all_array_compression_kwargs: {self.all_array_compression_kwargs}\n"
f" convert_unknown_ndarray_subclasses: {self.convert_unknown_ndarray_subclasses}\n"
f" default_version: {self.default_version}\n"
f" io_block_size: {self.io_block_size}\n"
f" legacy_fill_schema_defaults: {self.legacy_fill_schema_defaults}\n"
f" validate_on_read: {self.validate_on_read}\n"
">"
).format(
self.array_inline_threshold,
self.all_array_storage,
self.all_array_compression,
self.all_array_compression_kwargs,
self.convert_unknown_ndarray_subclasses,
self.default_version,
self.io_block_size,
self.legacy_fill_schema_defaults,
self.validate_on_read,
)


Expand Down

0 comments on commit cee306e

Please sign in to comment.