justaddcoffee/kg-emerging-viruses

View on GitHub

Showing 237 of 237 total issues

Function propFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function propFilter( props, specialEasing ) {
    var index, name, easing, value, hooks;

    // camelCase, specialEasing and expand cssHook pass
    for ( index in props ) {
Severity: Minor
Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

    Function make_holdouts has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def make_holdouts(
        nodes: str,
        edges: str,
        output_dir: str,
        train_fraction: float,
    Severity: Minor
    Found in kg_covid_19/make_holdouts.py - About 1 hr to fix

      Function remove has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          remove: function( owner, key ) {
              var i,
                  cache = owner[ this.expando ];
      
              if ( cache === undefined ) {
      Severity: Minor
      Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

            if ( support.matchesSelector && documentIsHTML &&
                !nonnativeSelectorCache[ expr + " " ] &&
                ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
                ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
        
        
        Severity: Major
        Found in docs/_static/jquery-3.5.1.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
                    && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
                  switch (event.keyCode) {
                    case 37: // left
                      var prevHref = $('link[rel="prev"]').prop('href');
          Severity: Major
          Found in docs/_static/doctools.js - About 1 hr to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    "even": createPositionalPseudo( function( matchIndexes, length ) {
                        var i = 0;
                        for ( ; i < length; i += 2 ) {
                            matchIndexes.push( i );
                        }
            Severity: Minor
            Found in docs/_static/jquery-3.5.1.js and 1 other location - About 55 mins to fix
            docs/_static/jquery-3.5.1.js on lines 2268..2274

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 54.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    "odd": createPositionalPseudo( function( matchIndexes, length ) {
                        var i = 1;
                        for ( ; i < length; i += 2 ) {
                            matchIndexes.push( i );
                        }
            Severity: Minor
            Found in docs/_static/jquery-3.5.1.js and 1 other location - About 55 mins to fix
            docs/_static/jquery-3.5.1.js on lines 2260..2266

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 54.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Function _gpi12iterator has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

            def _gpi12iterator(handle: TextIO) -> Generator:
                # Partly cribbed from Biopython GPI 1.1 parser
                # There is no GPI 1.2 parser yet, so I made this
                """Read GPI 1.2 format files (PRIVATE).
            
            

            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 9 (exceeds 5 allowed). Consider refactoring.
            Open

                def run(self, data_file: Optional[str] = None):
                    """Run transform to ingest data from IntAct for viral/human PPIs."""
                    data_files = list()
                    if not data_file:
                        data_files.append(
            Severity: Minor
            Found in kg_covid_19/transform_utils/intact/intact.py - About 55 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 parse_chembl_activity has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                def parse_chembl_activity(self, data: List):
                    """Parse ChEMBL Activity records.
            
                    An activity document links 4 entities,
                        - assay
            Severity: Minor
            Found in kg_covid_19/transform_utils/chembl/chembl_transform.py - About 55 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 access has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
            Severity: Major
            Found in docs/_static/jquery-3.5.1.js - About 50 mins to fix

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

              function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
              Severity: Minor
              Found in docs/_static/jquery-3.5.1.js - About 45 mins to fix

                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/_static/jquery-3.5.1.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/_static/jquery-3.5.1.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                for (i = 0; i < otherterms.length; i++) {
                                  if (haystack.indexOf(otherterms[i]) == -1) {
                                    allfound = false;
                                    break;
                                  }
                    Severity: Major
                    Found in docs/_static/searchtools.js - About 45 mins to fix

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

                          init: function( elem, options, prop, end, easing, unit ) {
                      Severity: Minor
                      Found in docs/_static/jquery-3.5.1.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( ( event.result = ret ) === false ) {
                                                    event.preventDefault();
                                                    event.stopPropagation();
                                                }
                        Severity: Major
                        Found in docs/_static/jquery-3.5.1.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/_static/jquery-3.5.1.js - About 45 mins to fix

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

                            function splitQuery(query) {
                                var result = [];
                                var start = -1;
                                for (var i = 0; i < query.length; i++) {
                                    if (splitChars[query.charCodeAt(i)]) {
                            Severity: Minor
                            Found in docs/_static/language_data.js - 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

                            Avoid deeply nested control flow statements.
                            Open

                                                if ( newContext !== context || !support.scope ) {
                            
                                                    // Capture the context ID, setting it first if necessary
                                                    if ( ( nid = context.getAttribute( "id" ) ) ) {
                                                        nid = nid.replace( rcssescape, fcssescape );
                            Severity: Major
                            Found in docs/_static/jquery-3.5.1.js - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language