lucasmiranda42/deepof

View on GitHub

Showing 345 of 363 total issues

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

const _displayItem = (item, searchTerms) => {
  const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
  const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
  const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
  const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
Severity: Minor
Found in docs/build/html/_static/searchtools.js - About 35 mins to fix

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 annotate_time_chunks has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def annotate_time_chunks(
    deepof_project: coordinates,
    soft_counts: table_dict,
    breaks: table_dict,
    supervised_annotations: table_dict = None,
Severity: Minor
Found in deepof/post_hoc.py - About 35 mins to fix

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 condition_distance_binning has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def condition_distance_binning(
    embedding: table_dict,
    soft_counts: table_dict,
    breaks: table_dict,
    exp_conditions: dict,
Severity: Minor
Found in deepof/post_hoc.py - About 35 mins to fix

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 get_distances has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def get_distances(self, tab_dict: dict, verbose: bool = True) -> dict:
        """Compute the distances between all selected body parts over time. If ego is provided, it only returns distances to a specified bodypart.

        Args:
            tab_dict (dict): Dictionary of pandas DataFrames containing the trajectories of all bodyparts.
Severity: Minor
Found in deepof/data.py - About 35 mins to fix

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 tune_search has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def tune_search(
    preprocessed_object: tuple,
    adjacency_matrix: np.ndarray,
    encoding_size: int,
    embedding_model: str,
Severity: Minor
Found in deepof/model_utils.py - About 35 mins to fix

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 get_angles has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    def get_angles(self, tab_dict: dict, verbose: bool = True) -> dict:
        """Compute all the angles between adjacent bodypart trios per video and per frame in the data.

        Args:
            tab_dict (dict): Dictionary of pandas DataFrames containing the trajectories of all bodyparts.
Severity: Minor
Found in deepof/data.py - About 35 mins to fix

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 gmm_model_selection has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def gmm_model_selection(
    x: pd.DataFrame,
    n_components_range: range,
    part_size: int,
    n_runs: int = 100,
Severity: Minor
Found in deepof/utils.py - About 35 mins to fix

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 sortInput ?
                ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
                0;
Severity: Major
Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return ret == null ? undefined : ret;
    Severity: Major
    Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                          return results;
      Severity: Major
      Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return select( selector.replace( rtrim, "$1" ), context, results, seed );
        Severity: Major
        Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return elem[ name ];
          Severity: Major
          Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return this.each( function( i ) {
                        var val;
            
                        if ( this.nodeType !== 1 ) {
                            return;
            Severity: Major
            Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return root.ready !== undefined ?
                              root.ready( selector ) :
              
                              // Execute immediately if ready is not present
                              selector( jQuery );
              Severity: Major
              Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                    return results;
                Severity: Major
                Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return value;
                  Severity: Major
                  Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return data;
                    Severity: Major
                    Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                          return results;
                      Severity: Major
                      Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return ret;
                        Severity: Major
                        Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                          return this.constructor( context ).find( selector );
                          Severity: Major
                          Found in docs/build/html/_static/jquery-3.6.0.js - About 30 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language