Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #256

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading