Showing 161 of 211 total issues
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function build
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def build(
Function eigensolve
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def eigensolve(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function field_stack_3D
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def field_stack_3D(phi, alpha, beta, gamma, zshift=0, degree=1, domain=None):
Function filtering
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def filtering(a, rfilt=0, function_space=None, degree=1, solver=None, mesh=None):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, markers, subdomains, mapping, *args, **kwargs):
Function plane_wave_2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plane_wave_2d(wavelength, theta, phase=0, amplitude=1, degree=1, domain=None):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, dict, geometry=None, pmls=None, dim=2, degree=1, element=None):
Function plot
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot(fplot, ax=None, geometry=None, proj_space=None, colorbar=True, **kwargs):
Function plot_geometry
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def plot_geometry(self, nper=1, ax=None, c="k", **kwargs):
if ax is None:
ax = plt.gca()
domains = self.geometry.subdomains["surfaces"]
scatt = [d for d in domains if d not in self.geometry.layers]
- 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_bands
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_bands(
Function plot_markers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_markers(markers, subdomains, ax=None, geometry=None, colorbar=True, **kwargs):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function add_circle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add_circle(self, x, y, z, r, surface=True, **kwargs):
Function cut
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def cut(self, id1, id2, dim1=None, dim2=None, sync=True, **kwargs):
Function field_stack_2D
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def field_stack_2D(phi, alpha, beta, yshift=0, degree=1, domain=None):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, wavelength, dim, phase=0, amplitude=1, degree=1, domain=None):