lucasmiranda42/deepof

View on GitHub

Showing 344 of 362 total issues

Function _highlight has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

const _highlight = (node, addItems, text, className) => {
  if (node.nodeType === Node.TEXT_NODE) {
    const val = node.nodeValue;
    const parent = node.parentNode;
    const pos = val.toLowerCase().indexOf(text);
Severity: Minor
Found in docs/build/html/_static/sphinx_highlight.js - About 1 hr 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 embedding_per_video has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

def embedding_per_video(
    coordinates: coordinates,
    to_preprocess: table_dict,
    model: tf.keras.models.Model,
    scale: str = "standard",
Severity: Minor
Found in deepof/model_utils.py - About 1 hr 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 _filter_embeddings has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

def _filter_embeddings(
    coordinates,
    embeddings,
    soft_counts,
    breaks,
Severity: Minor
Found in deepof/visuals.py - About 1 hr 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 14 arguments (exceeds 4 allowed). Consider refactoring.
Open

def annotate_time_chunks(
Severity: Major
Found in deepof/post_hoc.py - About 1 hr to fix

    Function get_TCN_encoder has 14 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def get_TCN_encoder(
    Severity: Major
    Found in deepof/models.py - About 1 hr to fix

      Function get_vade has 14 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def get_vade(
      Severity: Major
      Found in deepof/models.py - About 1 hr to fix

        Function extend has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jQuery.extend = jQuery.fn.extend = function() {
            var options, name, src, copy, copyIsArray, clone,
                target = arguments[ 0 ] || {},
                i = 1,
                length = arguments.length,
        Severity: Minor
        Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

          if (!jQuery.browser) {
              jQuery.uaMatch = function(ua) {
                  ua = ua.toLowerCase();
          
                  var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
          Severity: Critical
          Found in docs/build/html/_static/_sphinx_javascript_frameworks_compat.js - About 1 hr to fix

            Function style has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                style: function( elem, name, value, extra ) {
            
                    // Don't set styles on text and comment nodes
                    if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                        return;
            Severity: Minor
            Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

              Function stop has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  stop: function( type, clearQueue, gotoEnd ) {
                      var stopQueue = function( hooks ) {
                          var stop = hooks.stop;
                          delete hooks.stop;
                          stop( gotoEnd );
              Severity: Minor
              Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                Function dispatch has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    dispatch: function( nativeEvent ) {
                
                        var i, j, ret, matched, handleObj, handlerQueue,
                            args = new Array( arguments.length ),
                
                
                Severity: Minor
                Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                  Function access has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                      var i = 0,
                          len = elems.length,
                          bulk = key == null;
                  
                  
                  Severity: Minor
                  Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                    Function adjustCSS has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function adjustCSS( elem, prop, valueParts, tween ) {
                        var adjusted, scale,
                            maxIterations = 20,
                            currentValue = tween ?
                                function() {
                    Severity: Minor
                    Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                      Function tune_search has 13 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def tune_search(
                      Severity: Major
                      Found in deepof/model_utils.py - About 1 hr to fix

                        Function plot_stationary_entropy has 13 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def plot_stationary_entropy(
                        Severity: Major
                        Found in deepof/visuals.py - About 1 hr to fix

                          Function tag_annotated_frames has 13 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def tag_annotated_frames(
                          Severity: Major
                          Found in deepof/visuals.py - About 1 hr to fix

                            Function __init__ has 13 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def __init__(
                            Severity: Major
                            Found in deepof/models.py - About 1 hr to fix

                              Function toggleClass has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  toggleClass: function( value, stateVal ) {
                                      var type = typeof value,
                                          isValidValue = type === "string" || Array.isArray( value );
                              
                                      if ( typeof stateVal === "boolean" && isValidValue ) {
                              Severity: Minor
                              Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                                Function on has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function on( elem, types, selector, data, fn, one ) {
                                    var origFn, type;
                                
                                    // Types can be a map of types/handlers
                                    if ( typeof types === "object" ) {
                                Severity: Minor
                                Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

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

                                  def select_time_bin(
                                      embedding: table_dict = None,
                                      soft_counts: table_dict = None,
                                      breaks: table_dict = None,
                                      supervised_annotations: table_dict = None,
                                  Severity: Minor
                                  Found in deepof/post_hoc.py - About 1 hr 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language