Showing 68 of 135 total issues
Function _on_show_radial_parameters_button_clicked
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _on_show_radial_parameters_button_clicked(self, index):
# self._toggle_table_widget()
params = []
- 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 _interpolate_dipole_moment
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _interpolate_dipole_moment(self, igrid, dmfs):
# dipole_matrix = np.ones((self.H.nch, self.H.nch, igrid.shape[0]))
dipole_matrix = np.zeros((self.H.nch, self.H.nch, igrid.shape[0]))
- 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 extract_terms_in_range
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def extract_terms_in_range(self, uenergy=None, lenergy=None, usymm=None,
Function _compute_honl_london_factors
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _compute_honl_london_factors(self, usymm, lsymm, uj, lj, uomega,
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
Function plot_radial_functions
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_radial_functions(self, ops, show=False, fname=None, subplots=None,
Function optimize
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def optimize(self, ypar, yfixed, calculate_data, niter, derivative,
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, objs=None, pair_states=None, label='', model='pointwise',
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
Function set_constraints
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def set_constraints(self, uenr_range=None, lenr_range=None, lsymm=None,
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, objs, pair_states, label, model='pointwise', rotc=0.0,
Function _remove_layout
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _remove_layout(self, layout):
print(layout)
for i in range(len(layout)):
print(i, layout[i])
temp_layout = layout[i]
- 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 optimize_levels_by_svd_regular
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def optimize_levels_by_svd_regular(self, niter=1, derivative='n',
Function _write_fit_progress
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _write_fit_progress(self, rank, sing_values, tol, ypar, dypar, yfixed):
Function plot_levels_hist
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_levels_hist(self, data=None, show=False, fname=None,
Function _get_dydp_elem
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_dydp_elem(self, indices, sk, sk_grid, sk_coef, j, evecs_found):