BlueBrain/eFEL

View on GitHub
efel/pyfeatures/isi.py

Summary

Maintainability
C
1 day
Test Coverage

Showing 7 of 7 total issues

File isi.py has 299 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Features that are depending on the inter-spike intervals."""
from __future__ import annotations
import logging
from typing_extensions import deprecated
import warnings
Severity: Minor
Found in efel/pyfeatures/isi.py - About 3 hrs to fix

    Function initburst_sahp has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    def initburst_sahp() -> np.ndarray | None:
    """SlowAHP voltage after initial burst."""
    # Required cpp features
    voltage = get_cpp_feature("voltage")
    time = get_cpp_feature("time")
    Severity: Minor
    Found in efel/pyfeatures/isi.py - About 2 hrs to fix

    Function burst_ISI_indices has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    def burst_ISI_indices() -> np.ndarray | None:
    """Calculate burst ISI indices based on burst factor and ISI values."""
    # Fetching necessary data
    isi_values = ISI_values()
    if isi_values is None:
    Severity: Minor
    Found in efel/pyfeatures/isi.py - About 55 mins to fix

    Function _isi_log_slope_core has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def _isi_log_slope_core(
    Severity: Minor
    Found in efel/pyfeatures/isi.py - About 35 mins to fix

      Avoid too many return statements within this function.
      Open

      return None
      Severity: Major
      Found in efel/pyfeatures/isi.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

        return None
        Severity: Major
        Found in efel/pyfeatures/isi.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

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