Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#256)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.4](astral-sh/ruff-pre-commit@v0.8.6...v0.9.4)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Feb 27, 2025
1 parent b205fba commit 428e347
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
# - id: end-of-file-fixer
# - id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.4
hooks:
# - id: ruff
# args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 2 additions & 2 deletions doc/pylit.py
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ def code_block_handler(self, block):
for line in block:
if line.lstrip() and self.get_indent(line) < self._codeindent:
raise ValueError(
"code block contains line less indented " "than %d spaces \n%r" % (self._codeindent, block)
"code block contains line less indented than %d spaces \n%r" % (self._codeindent, block)
)
yield line.replace(" " * self._codeindent, "", 1)

Expand Down Expand Up @@ -1296,7 +1296,7 @@ def __init__(self):
p.add_option(
"--codeindent",
type="int",
help="Number of spaces to indent code blocks with " "text2code (default %d)" % defaults.codeindent,
help="Number of spaces to indent code blocks with text2code (default %d)" % defaults.codeindent,
)

# Output file handling
Expand Down
2 changes: 1 addition & 1 deletion refl1d/sample/flayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def set_anchor(self, stack, index):
# TODO: is there a sane way of computing magnetism thickness in advance?
def _calc_thickness(self):
if self.anchor is None:
raise ValueError("Need layer.magnetism.set_anchor(stack, layer) to compute" " magnetic thickness.")
raise ValueError("Need layer.magnetism.set_anchor(stack, layer) to compute magnetic thickness.")
stack, index = self.anchor
stack, start = stack._lookup(index)
total = 0
Expand Down
2 changes: 1 addition & 1 deletion refl1d/sample/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __mul__(self, other):
if not isinstance(other, int) or not other > 1:
raise TypeError("Repeat count must be an integer > 1")
if isinstance(self, Slab):
raise TypeError("Cannot repeat single slab" "")
raise TypeError("Cannot repeat single slab")
stack = Stack()
stack.add(self)
r = Repeat(stack=stack, repeat=other)
Expand Down
4 changes: 2 additions & 2 deletions refl1d/sample/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ def __or__(self, other):
"""
Interface for a material stacker, to support e.g., *stack = Si | air*.
"""
raise NotImplementedError("failed monkey-patch: material stacker needs" " to replace __or__ in Scatterer")
raise NotImplementedError("failed monkey-patch: material stacker needs to replace __or__ in Scatterer")

def __call__(self, *args, **kw):
"""
Interface for a material stacker, to support e.g., *stack = Si(thickness=)*.
"""
raise NotImplementedError("failed monkey-patch: material stacker needs" " to replace __call__ in Scatterer")
raise NotImplementedError("failed monkey-patch: material stacker needs to replace __call__ in Scatterer")

def __str__(self):
return self.name
Expand Down

0 comments on commit 428e347

Please sign in to comment.