File efeatures.py
has 525 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""eFeature classes"""
"""
Copyright (c) 2016-2020, EPFL/Blue Brain Project
Function __init__
has 23 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function calculate_feature
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def calculate_feature(
self,
responses,
raise_warnings=False,
return_waveforms=False,
- 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 __init__
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _setup_efel
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _setup_efel(self):
"""Set up efel before extracting the feature"""
import efel
efel.reset()
- 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 _construct_efel_trace
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _construct_efel_trace(self, responses):
"""Construct trace that can be passed to eFEL"""
trace = {}
if '' not in self.recording_names:
- 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 calculate_score
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def calculate_score(self, responses, trace_check=False):
"""Calculate the score"""
if (
responses[self.recording_names[""].replace("soma.v",
- 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 _setup_efel
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _setup_efel(self):
"""Set up efel before extracting the feature"""
import efel
- 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
Avoid too many return
statements within this function. Open
return feature_value, mean_wf
Avoid too many return
statements within this function. Open
return feature_value