justaddcoffee/kg-emerging-viruses

View on GitHub

Showing 217 of 237 total issues

Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        superMatcher = function( seed, context, xml, results, outermost ) {
            var elem, j, matcher,
                matchedCount = 0,
                i = "0",
                unmatched = seed && [],
Severity: Major
Found in docs/_static/jquery-3.5.1.js - About 2 hrs to fix

    Function run has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

        def run(self, data_file: Optional[str] = None):
            """Run the transformation."""
            ttd_file_name = os.path.join(
                self.input_base_dir, "P1-01-TTD_target_download.txt"
            )
    Severity: Minor
    Found in kg_covid_19/transform_utils/ttd/ttd.py - About 2 hrs 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 parse has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

        def parse(self, name: str, data_file: str, source: str) -> None:
            """Process the data_file.
    
            Args:
                name: Name of the ontology
    Severity: Minor
    Found in kg_covid_19/transform_utils/ontology/ontology_transform.py - About 2 hrs 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 run has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

        def run(self, data_file: Optional[str] = None) -> None:
            """Perform transformations to process protein-protein interactions.
    
            Args:
                data_file: data file to parse
    Severity: Minor
    Found in kg_covid_19/transform_utils/string_ppi/string_ppi.py - About 2 hrs 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 domManip has 60 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function domManip( collection, args, callback, ignored ) {
    
        // Flatten any nested arrays
        args = flat( args );
    
    
    Severity: Major
    Found in docs/_static/jquery-3.5.1.js - About 2 hrs to fix

      Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function ajaxConvert( s, response, jqXHR, isSuccess ) {
          var conv2, current, conv, tmp, prev,
              converters = {},
      
              // Work with a copy of dataTypes in case we need to modify it for conversion
      Severity: Major
      Found in docs/_static/jquery-3.5.1.js - About 2 hrs to fix

        Function highlightText has a Cognitive Complexity of 17 (exceeds 5 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/_static/doctools.js - About 2 hrs 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 displayNextItem has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function displayNextItem() {
              // results left, load the summary and display it
              if (results.length) {
                var item = results.pop();
                var listItem = $('<li style="display:none"></li>');
        Severity: Major
        Found in docs/_static/searchtools.js - About 2 hrs to fix

          File sars_cov_2_gene_annot.py has 258 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          """Transform for SARS-CoV-2 gene annotation data."""
          
          import logging
          import os
          from typing import Generator, List, Optional, TextIO

            Function eq has 54 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function eq(a, b, stack) {
                // Identical objects are equal. `0 === -0`, but they aren't identical.
                // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
                if (a === b) return a !== 0 || 1 / a == 1 / b;
                // A strict comparison is necessary because `null == undefined`.
            Severity: Major
            Found in docs/_static/underscore-1.3.1.js - About 2 hrs to fix

              Function init has 54 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  init = jQuery.fn.init = function( selector, context, root ) {
                      var match, elem;
              
                      // HANDLE: $(""), $(null), $(undefined), $(false)
                      if ( !selector ) {
              Severity: Major
              Found in docs/_static/jquery-3.5.1.js - About 2 hrs to fix

                File make_holdouts.py has 254 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """Functions for producing holdouts for graph ML."""
                
                import logging
                import os
                import random
                Severity: Minor
                Found in kg_covid_19/make_holdouts.py - About 2 hrs to fix

                  Function run has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def run(
                          self, data_file: Optional[str] = None, chembl_data_files: Optional[dict] = None
                      ) -> None:
                          """Call method and perform needed transformations.
                  
                  
                  Severity: Minor
                  Found in kg_covid_19/transform_utils/chembl/chembl_transform.py - About 2 hrs 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 run has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def run(
                          self, data_file: Optional[str] = None, species: str = "Homo sapiens"
                      ) -> None:
                          """
                          Call method and perform transformations.
                  Severity: Minor
                  Found in kg_covid_19/transform_utils/drug_central/drug_central.py - About 2 hrs 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 remove has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      remove: function( elem, types, handler, selector, mappedTypes ) {
                  
                          var j, origCount, tmp,
                              events, t, handleObj,
                              special, handlers, type, namespaces, origType,
                  Severity: Major
                  Found in docs/_static/jquery-3.5.1.js - About 2 hrs to fix

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

                      performObjectSearch : function(object, otherterms) {
                        var filenames = this._index.filenames;
                        var docnames = this._index.docnames;
                        var objects = this._index.objects;
                        var objnames = this._index.objnames;
                    Severity: Major
                    Found in docs/_static/searchtools.js - About 2 hrs to fix

                      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/_static/jquery-3.5.1.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/_static/jquery-3.5.1.js - About 2 hrs 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/_static/jquery-3.5.1.js - About 1 hr 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/_static/jquery-3.5.1.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language