From 0edcdb16b3bade7d0f27f838f1c8afb591ef5639 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 00:18:26 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.6...v0.9.4) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] From 442aa7a372a8bbde6eecc38a6b20c8928f542ce9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 00:18:33 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/pylit.py | 4 ++-- refl1d/sample/flayer.py | 2 +- refl1d/sample/layers.py | 2 +- refl1d/sample/material.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) 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