Showing 57 of 69 total issues
Function _pyedf_saveas_edf
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _pyedf_saveas_edf(
Function saveas_edf
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def saveas_edf(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function find_seizure_onset
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_seizure_onset(
Function find_seizure_offset
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def find_seizure_offset(
Function saveas_fif
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def saveas_fif(self, fpath, rawdata, info, bad_chans_list=[], montage: List = []):
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function saveas_hdf
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def saveas_hdf(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function copy_object_attributes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def copy_object_attributes(
Function findtimewins
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def findtimewins(times, timepoints):
indices = []
for time in ensure_list(times):
if time == 0:
indices.append(time)
- 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 _check_keys
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _check_keys(self, keys):
for key, possibilities in keys.items():
if key in self.data.keys():
if self.data[key] in possibilities:
continue
- 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 formal_repr
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def formal_repr(instance, attr_dict, sort_dict_flag=False):
""" A formal string representation for an object.
:param attr_dict: dictionary attribute_name: attribute_value
:param instance: Instance to read class name from it
"""
- 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
Consider simplifying this complex logical expression. Open
if (
isinstance(field1, str)
or isinstance(field1, list)
or isinstance(field1, dict)
or (isinstance(field1, np.ndarray) and field1.dtype.kind in "OSU")
Consider simplifying this complex logical expression. Open
if (transpose is "horizontal" or "row" and shape[0] > shape[1]) or (
transpose is "vertical" or "column" and shape[0] < shape[1]
):
shape = list(shape)
temp = shape[1]
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function add_participants_field
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_participants_field(
Function merge_npy_arrays
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def merge_npy_arrays(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(