BlueBrain/eFEL

View on GitHub

Showing 91 of 91 total issues

Function get_config_from_root has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def get_config_from_root(root: str) -> VersioneerConfig:
"""Read the project setup.cfg file to determine Versioneer config."""
# This might raise OSError (if setup.cfg is missing), or
# configparser.NoSectionError (if it lacks a [versioneer] section), or
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at
Severity: Minor
Found in versioneer.py - About 35 mins to fix

Function get_root has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def get_root() -> str:
"""Get the project root directory.
 
We require that all commands are run from the project root, i.e. the
directory that contains setup.py, setup.cfg, and versioneer.py .
Severity: Minor
Found in versioneer.py - About 35 mins 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

    Avoid too many return statements within this function.
    Open

    return {"version": "0+unknown", "full-revisionid": None,
    Severity: Major
    Found in efel/_version.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 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

            Avoid too many return statements within this function.
            Open

            return {"version": "0+unknown", "full-revisionid": None,
            Severity: Major
            Found in versioneer.py - About 30 mins to fix

              Function check_ais_initiation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def check_ais_initiation(soma_trace: dict, ais_trace: dict) -> bool:
              """Checks the initiation of action potential in AIS with respect to soma."""
              f_values = efel.get_feature_values(
              traces=[soma_trace, ais_trace], feature_names=["AP_begin_time"],
              parallel_map=None, return_list=True, raise_warnings=True
              Severity: Minor
              Found in efel/pyfeatures/validation.py - About 25 mins to fix

              Function get_versions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def get_versions() -> Dict[str, Any]:
              """Get version information or return default if unable to do so."""
              # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
              # __file__, we can work backwards from there to the root. Some
              # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
              Severity: Minor
              Found in efel/_version.py - About 25 mins to fix

              Function steps has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def steps(step_number, parameters):
               
              # instantiate the class
              cell = GrCmono(parameters)
               
               
              Severity: Minor
              Found in examples/deap/GranuleCell1/GranuleCell1.py - About 25 mins to fix
              Severity
              Category
              Status
              Source
              Language