Showing 161 of 211 total issues
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function get_coeffs_stack
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_coeffs_stack(config, lambda0, theta0, phi0, psi0):
Function is_on_plane
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def is_on_plane(P, A, B, C, eps=dolfin.DOLFIN_EPS):
Function diffraction_efficiencies
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def diffraction_efficiencies(
Function download_example_data
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def download_example_data(
Function __new__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __new__(self, markers, subdomains, mapping, cpp=True, **kwargs):
Function get_stack_efficiencies
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_stack_efficiencies(thicknesses, epsilon, mu, lambda0, angles):
Function get_cross_sections_analytical
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_cross_sections_analytical(k0, a, eps_sphere=4, eps_bg=1, Nmax=25):
Function fuse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def fuse(self, id1, id2, dim1=None, dim2=None, sync=True):
Function add_square
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add_square(self, x, y, z, dx, **kwargs):
Function transfer_sub_mesh
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def transfer_sub_mesh(x, geometry, source_space, target_space, subdomain):
Function maxwell
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def maxwell(self, u, v, epsilon, inv_mu, domain="everywhere"):
Function download_data
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def download_data(
Function calculate_analytical_cross_sections
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def calculate_analytical_cross_sections(eps_cyl, eps_bg, wavelength, radius, N=50):
Function diffraction_efficiencies
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def diffraction_efficiencies(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function plot_boundaries
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def plot_boundaries(markers, domain=None, shift=(0, 0), ax=None, **kwargs):
Function density_proj_filt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def density_proj_filt(self, density, proj, filt, filtering_type):
Function env_get_outdated
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def env_get_outdated(app, env, added, changed, removed):
Function __new__
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
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"