lucasmiranda42/deepof

View on GitHub

Showing 344 of 362 total issues

Avoid deeply nested control flow statements.
Open

                } else if ( match[ 2 ] ) {
                    push.apply( results, context.getElementsByTagName( selector ) );
                    return results;

                // Class selector
Severity: Major
Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                        if ( ( ofType ?
                                            node.nodeName.toLowerCase() === name :
                                            node.nodeType === 1 ) &&
                                            ++diff ) {
    
    
    Severity: Major
    Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if ( matchedSelectors[ sel ] === undefined ) {
                                  matchedSelectors[ sel ] = handleObj.needsContext ?
                                      jQuery( sel, this ).index( cur ) > -1 :
                                      jQuery.find( sel, this, null, [ cur ] ).length;
                              }
      Severity: Major
      Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if ( matchedSelectors[ sel ] ) {
                                    matchedHandlers.push( handleObj );
                                }
        Severity: Major
        Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if ( copyIsArray && !Array.isArray( src ) ) {
                                  clone = [];
                              } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
                                  clone = {};
                              } else {
          Severity: Major
          Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                                if ( ofType ?
                                                    node.nodeName.toLowerCase() === name :
                                                    node.nodeType === 1 ) {
            
                                                    return false;
            Severity: Major
            Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ( !selector ) {
                                      push.apply( results, seed );
                                      return results;
                                  }
              Severity: Major
              Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if ( node && node.value === id ) {
                                            return [ elem ];
                                        }
                Severity: Major
                Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if ( attrs[ i ] ) {
                                              name = attrs[ i ].name;
                                              if ( name.indexOf( "data-" ) === 0 ) {
                                                  name = camelCase( name.slice( 5 ) );
                                                  dataAttr( elem, name, data[ name ] );
                  Severity: Major
                  Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            for ( type in data.events ) {
                                                if ( special[ type ] ) {
                                                    jQuery.event.remove( elem, type );
                    
                                                // This is a shortcut to avoid jQuery.event.remove's overhead
                    Severity: Major
                    Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                      } else if ( copy !== undefined ) {
                                          target[ name ] = copy;
                                      }
                      Severity: Major
                      Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                for ( match in context ) {
                        
                                                    // Properties of context are called as methods if possible
                                                    if ( isFunction( this[ match ] ) ) {
                                                        this[ match ]( context[ match ] );
                        Severity: Major
                        Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if ( restoreDisplay == null ) {
                                                  display = style.display;
                                                  restoreDisplay = display === "none" ? "" : display;
                                              }
                          Severity: Major
                          Found in docs/build/html/_static/jquery-3.6.0.js - About 45 mins to fix

                            Function dcl_loss has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def dcl_loss(
                            Severity: Minor
                            Found in deepof/model_utils.py - About 45 mins to fix

                              Function mask_outliers has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def mask_outliers(
                              Severity: Minor
                              Found in deepof/utils.py - About 45 mins to fix

                                Function plot_stationary_entropy has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                Open

                                def plot_stationary_entropy(
                                    coordinates: coordinates,
                                    embeddings: table_dict,
                                    soft_counts: table_dict,
                                    breaks: table_dict = None,
                                Severity: Minor
                                Found in deepof/visuals.py - About 45 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 close_single_contact has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def close_single_contact(
                                Severity: Minor
                                Found in deepof/annotation_utils.py - About 45 mins to fix

                                  Function climb_wall has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def climb_wall(
                                  Severity: Minor
                                  Found in deepof/annotation_utils.py - About 45 mins to fix

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

                                        def __init__(
                                    Severity: Minor
                                    Found in deepof/model_utils.py - About 45 mins to fix

                                      Function _fit_hmm_range has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      def _fit_hmm_range(concat_embeddings, states, min_states, max_states):
                                          """Auxiliary function for fitting a range of HMMs with different number of states.
                                      
                                          Args:
                                              concat_embeddings (np.ndarray): Concatenated embeddings across all animal experiments.
                                      Severity: Minor
                                      Found in deepof/post_hoc.py - About 45 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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language