diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 47e31884..e3e067ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] diff --git a/doc/pylit.py b/doc/pylit.py index 5f5a0b86..3b4397eb 100755 --- a/doc/pylit.py +++ b/doc/pylit.py @@ -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) @@ -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 diff --git a/refl1d/sample/flayer.py b/refl1d/sample/flayer.py index 2f68f6ea..801006c3 100644 --- a/refl1d/sample/flayer.py +++ b/refl1d/sample/flayer.py @@ -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 diff --git a/refl1d/sample/layers.py b/refl1d/sample/layers.py index 7671a2a7..49717af5 100644 --- a/refl1d/sample/layers.py +++ b/refl1d/sample/layers.py @@ -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) diff --git a/refl1d/sample/material.py b/refl1d/sample/material.py index cd81aba1..07f2b616 100644 --- a/refl1d/sample/material.py +++ b/refl1d/sample/material.py @@ -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