BlueBrain/eFEL

View on GitHub
efel/pyfeatures/pyfeatures.py

Summary

Maintainability
C
1 day
Test Coverage

Showing 4 of 4 total issues

File pyfeatures.py has 374 lines of code (exceeds 250 allowed). Consider refactoring.
Open

from __future__ import annotations
"""Python implementation of features"""
 
"""
Copyright (c) 2015, Blue Brain Project/EPFL
Severity: Minor
Found in efel/pyfeatures/pyfeatures.py - About 5 hrs to fix

    Function depol_block has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    def depol_block():
    """Check for a depolarization block"""
     
    # if there is no depolarization block return 1
    # if there is a depolarization block return None
    Severity: Minor
    Found in efel/pyfeatures/pyfeatures.py - About 1 hr to fix

    Function impedance has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def impedance():
    from scipy.ndimage.filters import gaussian_filter1d
     
    dt = _get_cpp_data("interp_step")
    Z_max_freq = _get_cpp_data("impedance_max_freq")
    Severity: Minor
    Found in efel/pyfeatures/pyfeatures.py - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

    return np.array([1])
    Severity: Major
    Found in efel/pyfeatures/pyfeatures.py - About 30 mins to fix
      Category
      Status