Skip to content

Commit

Permalink
remove some pylint useless-suppressions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jul 28, 2023
1 parent 62904c0 commit 27d976d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pytential/linalg/skeletonization.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def prg():
result = actx.zeros((cluster_index.nclusters,), dtype=waa.entry_dtype)

from arraycontext import flatten
_, (waa_per_cluster,) = prg()(actx.queue, # pylint: disable=not-callable
_, (waa_per_cluster,) = prg()(actx.queue,
waa=flatten(waa, actx),
result=result,
indices=cluster_index.indices,
Expand Down
2 changes: 1 addition & 1 deletion pytential/linalg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def interp_decomp(
if rank is not None and eps is not None:
raise ValueError("providing both 'rank' and 'eps' is not supported")

import scipy.linalg.interpolative as sli # pylint:disable=no-name-in-module
import scipy.linalg.interpolative as sli
if rank is None:
k, idx, proj = sli.interp_decomp(A, eps)
else:
Expand Down
2 changes: 1 addition & 1 deletion pytential/symbolic/pde/maxwell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def curl_S(dens, k):
F3 = (xyz_to_tangential(sym.n_cross(E1-E0) + 0.5*(mu0+mu1)*Mxyz))

# sign flip included
F4 = -sym.n_dot(mu1*H1-mu0*H0) + 0.5*(mu1+mu0)*u.rho_m # noqa pylint:disable=invalid-unary-operand-type
F4 = -sym.n_dot(mu1*H1-mu0*H0) + 0.5*(mu1+mu0)*u.rho_m

return sym.flat_obj_array(F1, F2, F3, F4)

Expand Down
6 changes: 3 additions & 3 deletions pytential/symbolic/pde/scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def representation(self, u,
inv_sqrt_w_u = sym.cse(u/sqrt_w)

if map_potentials is None:
def map_potentials(x): # pylint:disable=function-redefined
def map_potentials(x):
return x

kwargs["kernel_arguments"] = self.kernel_arguments
Expand Down Expand Up @@ -351,7 +351,7 @@ def representation(self, u,
laplace_s_inv_sqrt_w_u = sym.cse(sym.S(self.laplace_kernel, inv_sqrt_w_u))

if map_potentials is None:
def map_potentials(x): # pylint:disable=function-redefined
def map_potentials(x):
return x

kwargs["qbx_forced_limit"] = qbx_forced_limit
Expand Down Expand Up @@ -505,7 +505,7 @@ def representation(self, sigma,
"""

if map_potentials is None:
def map_potentials(x): # pylint:disable=function-redefined
def map_potentials(x):
return x

def dv(knl):
Expand Down
4 changes: 2 additions & 2 deletions test/extra_int_eq_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def knl_sym_kwargs(self):

def get_operator(self, ambient_dim):
sign = +1 if self.side in [+1, "scat"] else -1
knl = self.knl_class(ambient_dim) # noqa: pylint:disable=E1102
knl = self.knl_class(ambient_dim)

if self.bc_type == "dirichlet":
from pytential.symbolic.pde.scalar import DirichletOperator
Expand Down Expand Up @@ -268,7 +268,7 @@ class CurveTestCase(IntegralEquationTestCase):
resolutions: List[int] = field(default_factory=lambda: [40, 50, 60])

def _curve_fn(self, t):
return self.curve_fn(t) # pylint:disable=not-callable
return self.curve_fn(t)

def get_mesh(self, resolution, mesh_order):
from meshmode.mesh.generation import make_curve_mesh
Expand Down
4 changes: 2 additions & 2 deletions test/test_linalg_skeletonization.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def test_skeletonize_by_proxy(actx_factory, case, visualize=False):
empirically determined (not too huge) :math:`c`.
"""

import scipy.linalg.interpolative as sli # pylint:disable=no-name-in-module
import scipy.linalg.interpolative as sli
sli.seed(42)

actx = actx_factory()
Expand Down Expand Up @@ -404,7 +404,7 @@ def test_skeletonize_by_proxy_convergence(
accuracy of the skeletonization scales linearly with :math:`\epsilon_{id}`
(the ID tolerance).
"""
import scipy.linalg.interpolative as sli # pylint:disable=no-name-in-module
import scipy.linalg.interpolative as sli
sli.seed(42)

actx = actx_factory()
Expand Down

0 comments on commit 27d976d

Please sign in to comment.