Showing 161 of 211 total issues
Function postpro_download_links
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def postpro_download_links(fn):
sgfoot = None
with open(fn, "r") as file:
soup = BeautifulSoup(file, "html.parser")
for item in soup.findAll(["div"]):
- 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 create_geometry
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_geometry(wavelength, pml_width):
R1 = 60
R2 = 30
Rcalc = 2 * R1
lmin = wavelength / pmesh
Function plane_wave_3d
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plane_wave_3d(
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function get_T_matrix_coeff
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_T_matrix_coeff(
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function get_periodic_bnds
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
def get_periodic_bnds(self):
verts = self.vertices
# get all boundaries
bnds = self.get_entities(2)
maps = []
- 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 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 plot_real
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_real(
Function plot_complex
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_complex(
Function make_stack
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def make_stack(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function solve
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def solve(thicknesses, eps, mu, lambda0, theta0, phi0, psi0):
Function _build_serial
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _build_serial(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function fragment
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def fragment(self, id1, id2, dim1=None, dim2=None, sync=True, map=False, **kwargs):
Function intersect
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def intersect(self, id1, id2, dim1=None, dim2=None, sync=True, map=False, **kwargs):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function green_function_2d
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def green_function_2d(wavelength, xs, ys, phase=0, amplitude=1, degree=1, domain=None):
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(