lucasmiranda42/deepof

View on GitHub

Showing 344 of 362 total issues

Function buildFragment has 51 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function buildFragment( elems, context, scripts, selection, ignored ) {
    var elem, tmp, tag, wrap, attached, j,
        fragment = context.createDocumentFragment(),
        nodes = [],
        i = 0,
Severity: Major
Found in docs/build/html/_static/jquery-3.6.0.js - About 2 hrs to fix

    Function performObjectSearch has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      performObjectSearch: (object, objectTerms) => {
        const filenames = Search._index.filenames;
        const docNames = Search._index.docnames;
        const objects = Search._index.objects;
        const objNames = Search._index.objnames;
    Severity: Minor
    Found in docs/build/html/_static/searchtools.js - About 2 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                      if ( ( mappedTypes || origType === handleObj.origType ) &&
                          ( !handler || handler.guid === handleObj.guid ) &&
                          ( !tmp || tmp.test( handleObj.namespace ) ) &&
                          ( !selector || selector === handleObj.selector ||
                              selector === "**" && handleObj.selector ) ) {
      Severity: Critical
      Found in docs/build/html/_static/jquery-3.6.0.js - About 2 hrs to fix

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

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

          Function select has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          select = Sizzle.select = function( selector, context, results, seed ) {
              var i, tokens, token, type, find,
                  compiled = typeof selector === "function" && selector,
                  match = !seed && tokenize( ( selector = compiled.selector || selector ) );
          
          
          Severity: Minor
          Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

            Function highlightText has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            jQuery.fn.highlightText = function(text, className) {
                function highlight(node, addItems) {
                    if (node.nodeType === 3) {
                        var val = node.nodeValue;
                        var pos = val.toLowerCase().indexOf(text);
            Severity: Minor
            Found in docs/build/html/_static/_sphinx_javascript_frameworks_compat.js - About 1 hr to fix

              Function matcherFromTokens has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function matcherFromTokens( tokens ) {
                  var checkContext, matcher, j,
                      len = tokens.length,
                      leadingRelative = Expr.relative[ tokens[ 0 ].type ],
                      implicitRelative = leadingRelative || Expr.relative[ " " ],
              Severity: Minor
              Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                Function compute_transition_matrix_per_condition has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                Open

                def compute_transition_matrix_per_condition(
                    embedding: table_dict,
                    soft_counts: table_dict,
                    breaks: table_dict,
                    exp_conditions: dict,
                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

                Function plot_cluster_detection_performance has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                Open

                def plot_cluster_detection_performance(
                    coordinates: coordinates,
                    chunk_stats: pd.DataFrame,
                    cluster_gbm_performance: dict,
                    hard_counts: np.ndarray,
                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 recluster has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                Open

                def recluster(
                    coordinates: coordinates,
                    embeddings: table_dict,
                    soft_counts: table_dict = None,
                    min_confidence: float = 0.75,
                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

                Function connect_mouse has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                Open

                def connect_mouse(
                    animal_ids=None, exclude_bodyparts: list = None, graph_preset: str = "deepof_14"
                ) -> nx.Graph:
                    """Create a nx.Graph object with the connectivity of the bodyparts in the DLC topview model for a single mouse.
                
                
                Severity: Minor
                Found in deepof/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 addCombinator has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function addCombinator( matcher, combinator, base ) {
                    var dir = combinator.dir,
                        skip = combinator.next,
                        key = skip || dir,
                        checkNonElements = base && key === "parentNode",
                Severity: Minor
                Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                  Function plot_transitions has 15 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

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

                    Function animate_skeleton has 15 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

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

                      Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
                          var matched, match, tokens, type,
                              soFar, groups, preFilters,
                              cached = tokenCache[ selector + " " ];
                      
                      
                      Severity: Minor
                      Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                        Function template has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          function template(text, settings, oldSettings) {
                            if (!settings && oldSettings) settings = oldSettings;
                            settings = defaults({}, settings, _$1.templateSettings);
                        
                            // Combine delimiters into one regular expression via alternation.
                        Severity: Minor
                        Found in docs/build/html/_static/underscore-1.13.1.js - About 1 hr to fix

                          Function val has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              val: function( value ) {
                                  var hooks, ret, valueIsFunction,
                                      elem = this[ 0 ];
                          
                                  if ( !arguments.length ) {
                          Severity: Minor
                          Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                            Function _highlight has 44 lines of code (exceeds 25 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

                              Function leverageNative has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function leverageNative( el, type, expectSync ) {
                              
                                  // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
                                  if ( !expectSync ) {
                                      if ( dataPriv.get( el, type ) === undefined ) {
                              Severity: Minor
                              Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix

                                Function data has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    data: function( key, value ) {
                                        var i, name, data,
                                            elem = this[ 0 ],
                                            attrs = elem && elem.attributes;
                                
                                
                                Severity: Minor
                                Found in docs/build/html/_static/jquery-3.6.0.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language