muneebalam/scrapenhl2

View on GitHub

Showing 385 of 747 total issues

Function team_dpair_shot_rates_scatter has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

def team_dpair_shot_rates_scatter(team, min_pair_toi=50, **kwargs):
    """
    Creates a scatterplot of team defense pair shot attempr rates.

    :param team: int or str, team
Severity: Minor
Found in scrapenhl2/plot/defense_pairs.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 generate_team_ids_file has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

def generate_team_ids_file(teamids=None):
    """
    Reads all team id URLs and stores information to disk. Has the following information:

    - ID: int
Severity: Minor
Found in scrapenhl2/scrape/team_info.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 clone has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    clone: function( elem, dataAndEvents, deepDataAndEvents ) {
        var i, l, srcElements, destElements,
            clone = elem.cloneNode( true ),
            inPage = jQuery.contains( elem.ownerDocument, elem );

Severity: Minor
Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

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

      function getComments(id) {
        $.ajax({
         type: 'GET',
         url: opts.getCommentsURL,
         data: {node: id},
    Severity: Minor
    Found in docs/build/html/_static/websupport.js - About 1 hr to fix

      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/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

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

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

            function getComments(id) {
              $.ajax({
               type: 'GET',
               url: opts.getCommentsURL,
               data: {node: id},
          Severity: Minor
          Found in docs/build/_static/websupport.js - About 1 hr to fix

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

                clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                    var i, l, srcElements, destElements,
                        clone = elem.cloneNode( true ),
                        inPage = jQuery.contains( elem.ownerDocument, elem );
            
            
            Severity: Minor
            Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

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

                  offset: function( options ) {
              
                      // Preserve chaining for setter
                      if ( arguments.length ) {
                          return options === undefined ?
              Severity: Minor
              Found in docs/build/html/_static/jquery-3.1.0.js - 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/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

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

                      when: function( singleValue ) {
                          var
                  
                              // count of uncompleted subordinates
                              remaining = arguments.length,
                  Severity: Minor
                  Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

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

                    jQuery.speed = function( speed, easing, fn ) {
                        var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
                            complete: fn || !fn && easing ||
                                jQuery.isFunction( speed ) && speed,
                            duration: speed,
                    Severity: Minor
                    Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

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

                          offset: function( options ) {
                      
                              // Preserve chaining for setter
                              if ( arguments.length ) {
                                  return options === undefined ?
                      Severity: Minor
                      Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

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

                        jQuery.speed = function( speed, easing, fn ) {
                            var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
                                complete: fn || !fn && easing ||
                                    jQuery.isFunction( speed ) && speed,
                                duration: speed,
                        Severity: Minor
                        Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

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

                              when: function( singleValue ) {
                                  var
                          
                                      // count of uncompleted subordinates
                                      remaining = arguments.length,
                          Severity: Minor
                          Found in docs/build/_static/jquery-3.1.0.js - 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/build/_static/jquery-3.1.0.js - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

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

                                Consider simplifying this complex logical expression.
                                Open

                                        if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                                support.getById && context.nodeType === 9 && documentIsHTML &&
                                                Expr.relative[ tokens[1].type ] ) {
                                
                                            context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                                Severity: Major
                                Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

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

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
                                                    support.getById && context.nodeType === 9 && documentIsHTML &&
                                                    Expr.relative[ tokens[1].type ] ) {
                                    
                                                context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
                                    Severity: Major
                                    Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language