justaddcoffee/kg-emerging-viruses

View on GitHub

Showing 217 of 237 total issues

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/_static/doctools.js - About 1 hr to fix

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

        def make_id_mapping_file(
            self,
            map_file: str,
            sep: str = "\t",
            pharmgkb_id_col: str = "PharmGKB Accession Id",
    Severity: Minor
    Found in kg_covid_19/transform_utils/pharmgkb/pharmgkb.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 gpi_to_gene_node_data has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

        def gpi_to_gene_node_data(self, rec: dict) -> list:
            """Return node that can be passed to write_node_edge_item().
    
            Uses a parsed gpi entry.
            :param rec: record from gpi iterator

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

        def parse_experiment_info(self, xmldoc: minidom.Document) -> Dict[int, str]:
            """Extract info about experiment from miXML doc.
    
            :param self: IntAct instance
            :param xmldoc: a minidom object containing a miXML doc
    Severity: Minor
    Found in kg_covid_19/transform_utils/intact/intact.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/_static/jquery-3.5.1.js - 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/_static/jquery-3.5.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/_static/jquery-3.5.1.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/_static/jquery-3.5.1.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/_static/jquery-3.5.1.js - About 1 hr to fix

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

              def download_from_yaml(
                  yaml_file: str, output_dir: str, ignore_cache: bool = False
              ) -> None:
                  """
                  Download files specified in an input yaml.
              Severity: Minor
              Found in kg_covid_19/utils/download_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 interaction_to_edge has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
              Open

                  def interaction_to_edge(
                      self, interaction: minidom.Element, nodes_dict: dict, exp_dict: dict
                  ) -> list:
                      """Parse an interaction to an edge."""
                      edges: List[list] = []
              Severity: Minor
              Found in kg_covid_19/transform_utils/intact/intact.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 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/_static/jquery-3.5.1.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/_static/doctools.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/_static/jquery-3.5.1.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/_static/jquery-3.5.1.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/_static/jquery-3.5.1.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/_static/jquery-3.5.1.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/_static/jquery-3.5.1.js - About 1 hr to fix

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

                                setOffset: function( elem, options, i ) {
                                    var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
                                        position = jQuery.css( elem, "position" ),
                                        curElem = jQuery( elem ),
                                        props = {};
                            Severity: Minor
                            Found in docs/_static/jquery-3.5.1.js - 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/_static/jquery-3.5.1.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language