Showing 211 of 211 total issues
Function simp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def simp(a, s_min=1, s_max=2, p=1, complex=True):
Function get_stack_efficiencies
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_stack_efficiencies(thicknesses, epsilon, mu, lambda0, angles):
Function rotate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def rotate(self, tag, point, axis, angle, dim=None):
Function get_coeffs_stack
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_coeffs_stack(config, lambda0, theta0, phi0, psi0):
Function add_square
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_square(self, x, y, z, dx, **kwargs):
Function maxwell
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def maxwell(self, u, v, epsilon, inv_mu, domain="everywhere"):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function get_cross_sections_analytical
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_cross_sections_analytical(k0, a, eps_sphere=4, eps_bg=1, Nmax=25):
Function __new__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __new__(self, markers, subdomains, mapping, cpp=True, **kwargs):
Function __new__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __new__(self, markers, subdomains, mapping, cpp=True, **kwargs):
Function density_proj_filt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def density_proj_filt(self, density, proj, filt, filtering_type):
Function env_get_outdated
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def env_get_outdated(app, env, added, changed, removed):
Function jacobian_matrix
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def jacobian_matrix(self):
if self.direction == "x":
s = self.stretch, 1, 1
elif self.direction == "y":
s = 1, self.stretch, 1
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function build_geometry
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def build_geometry(pmesh):
pmesh_scatt = 1 * pmesh
b = a * 2 * 1.2
box_size = (b, b, b)
pml_width = (lambda0, lambda0, lambda0)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __new__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def __new__(cls, markers, subdomains, mapping, cpp=True, **kwargs):
iterable = any(isiter(v) for v in mapping.values())
flatvals = _flatten_list(mapping.values())
cplx = any(iscomplex(v) and np.any(v.imag != 0) for v in flatvals)
if iterable:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function set_size
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def set_size(self, idf, s, dim=None):
if hasattr(idf, "__len__") and not isinstance(idf, str):
for i, id_ in enumerate(idf):
s_ = s[i] if hasattr(s, "__len__") else s
params = {id_: s_}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function weak
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def weak(self, a):
self.mesh = a.function_space().mesh() if self._mesh is None else self._mesh
self.dim = self.mesh.ufl_domain().geometric_dimension()
self.function_space = self._function_space or df.FunctionSpace(
self.mesh, "CG", self.degree
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function compute_absorption
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def compute_absorption(self, subdomain_absorption=False):
omega = self.source.pulsation
doms_no_pml = [
z for z in self.epsilon.keys() if z not in ["pml_bottom", "pml_top"]
]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function plot
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def plot(self, figsize=None, ax=None):
if self.dim == 2:
tri, cb = plot(self.expression, mesh=self.domain, ax=ax)
fig = plt.gcf()
ax = fig.axes
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function plot_field
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def plot_field(
self,
nper=1,
type="real",
field="total",
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"