Skip to content

Commit

Permalink
Merge pull request #1482 from asdf-format/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamJamieson authored Mar 14, 2023
2 parents 543ea8e + ea8bda6 commit 72c70c5
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
- id: text-unicode-replacement-char

- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.4
hooks:
- id: codespell
args: ["--write-changes"]
Expand All @@ -42,7 +42,7 @@ repos:
exclude: "asdf/extern/.*"

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.254'
rev: 'v0.0.255'
hooks:
- id: ruff
args: ["--fix"]
Expand Down
2 changes: 1 addition & 1 deletion asdf/_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def _render_node(self, info, active_depths, is_tail):
message = " (truncated)"
line = line[0 : (self._max_cols - len(message))] + format_faint(format_italic(message))

return line # noqa: RET504
return line

def _render_node_value(self, info):
rendered_type = type(info.node).__name__
Expand Down
4 changes: 2 additions & 2 deletions asdf/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def _remove_condition(m):
if package is not None:
result = result and m.package_name == package

return result # noqa: RET504
return result

with self._lock:
self._resource_mappings = [m for m in self.resource_mappings if not _remove_condition(m)]
Expand Down Expand Up @@ -193,7 +193,7 @@ def _remove_condition(e):
if package is not None:
result = result and e.package_name == package

return result # noqa: RET504
return result

with self._lock:
self._extensions = [e for e in self.extensions if not _remove_condition(e)]
Expand Down
2 changes: 1 addition & 1 deletion asdf/generic_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def read(self, nbytes=None):
self._trailing_content = content[nbytes:]
content = content[:nbytes]

return content # noqa: RET504
return content


class GenericFile(metaclass=util.InheritDocstrings):
Expand Down
2 changes: 1 addition & 1 deletion asdf/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def __getitem__(self, uri):
if isinstance(content, str):
content = content.encode("utf-8")

return content # noqa: RET504
return content

def __len__(self):
return len(self._mappings_by_uri)
Expand Down
2 changes: 1 addition & 1 deletion docs/asdf/extending/resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ method or the ``asdf.resource_mappings`` entry point.
Installing resources via AsdfConfig
===================================

The simplest way to isntall a resource into `asdf` is to add it at runtime using the
The simplest way to install a resource into `asdf` is to add it at runtime using the
`AsdfConfig.add_resource_mapping <asdf.config.AsdfConfig.add_resource_mapping>` method.
For example, the following code istalls a schema for use with the `asdf.AsdfFile`
custom_schema argument:
Expand Down
2 changes: 1 addition & 1 deletion docs/asdf/extending/uris.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
URIs in ASDF
============

The ASDF format uses **U**\ niform **R**\ esource **I**\ dentifiers to refer to various
The ASDF format uses **U**\ niform **R**\ esource **I**\ identifiers to refer to various
entities such as schemas or tags. These are string identifiers that often resemble
web addresses that uniquely identify the associated entity. Here are some examples
of URIs that might be encountered in an ASDF file:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ extend-ignore = [
"PTH", # flake8-use-pathlib
# Individually ignored checks
"PIE810", # Call `startswith` once with a `tuple`
"PLC1901", # compare-to-empty-string
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
Expand Down

0 comments on commit 72c70c5

Please sign in to comment.