Skip to content

Commit 0fd7598

Browse files
committed
Ignore irrelevant instances of RUF069
1 parent d275153 commit 0fd7598

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

sumpy/codegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def map_constant(self, expr: object, /) -> Expression:
600600

601601
complex_dtype = self.complex_dtype
602602
if complex_dtype is None:
603-
if complex(np.complex64(expr)) == expr:
603+
if complex(np.complex64(expr)) == expr: # noqa: RUF069
604604
return np.complex64(expr)
605605

606606
complex_dtype = np.complex128

sumpy/kernel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ def __new__(cls,
770770
viscosity_mu: float | str | SpatialConstant = "mu",
771771
poisson_ratio: float | str | SpatialConstant = "nu",
772772
) -> ElasticityKernel:
773-
if poisson_ratio == 0.5:
773+
if poisson_ratio == 0.5: # noqa: RUF069
774774
return super().__new__(StokesletKernel)
775775
else:
776776
return super().__new__(cls)
@@ -896,7 +896,7 @@ def __init__(self,
896896
if poisson_ratio is None:
897897
poisson_ratio = 0.5
898898

899-
if poisson_ratio != 0.5:
899+
if poisson_ratio != 0.5: # noqa: RUF069
900900
raise ValueError(
901901
"'StokesletKernel' must have a Poisson ratio of 0.5: "
902902
f"got '{poisson_ratio}'")

sumpy/test/test_kernels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,14 +695,14 @@ def test_m2m_and_l2l_exprs_simpler(base_knl, local_expn_class, mpole_expn_class,
695695
dvec, tgt_rscale, _fast_version=False)
696696

697697
for expr1, expr2 in zip(faster_m2m, slower_m2m, strict=True):
698-
assert float(sym.doit(expr1 - expr2).expand()) == 0.0
698+
assert float(sym.doit(expr1 - expr2).expand()) == 0.0 # noqa: RUF069
699699

700700
faster_l2l = local_expn.translate_from(local_expn, src_coeff_exprs, src_rscale,
701701
dvec, tgt_rscale)
702702
slower_l2l = local_expn.translate_from(local_expn, src_coeff_exprs, src_rscale,
703703
dvec, tgt_rscale, _fast_version=False)
704704
for expr1, expr2 in zip(faster_l2l, slower_l2l, strict=True):
705-
assert float(sym.doit(expr1 - expr2).expand()) == 0.0
705+
assert float(sym.doit(expr1 - expr2).expand()) == 0.0 # noqa: RUF069
706706

707707
# }}}
708708

0 commit comments

Comments
 (0)