muneebalam/scrapenhl2

View on GitHub

Showing 385 of 747 total issues

Function deleteComment has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    Function attr has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        attr: function( elem, name, value ) {
            var ret, hooks,
                nType = elem.nodeType;
    
            // Don't get/set attributes on text, comment and attribute nodes
    Severity: Minor
    Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

      Function deleteComment has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Function attr has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            attr: function( elem, name, value ) {
                var ret, hooks,
                    nType = elem.nodeType;
        
                // Don't get/set attributes on text, comment and attribute nodes
        Severity: Minor
        Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

          Function _game_h2h_chart has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def _game_h2h_chart(season, game, corsi, toi, orderh, orderr, numf_h=None, numf_r=None, save_file=None):
          Severity: Major
          Found in scrapenhl2/plot/game_h2h.py - About 1 hr to fix

            Function add_players_to_file has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def add_players_to_file(filename, focus_team, season=None, gamecol='Game', periodcol='Period', timecol='Time',
            Severity: Major
            Found in scrapenhl2/manipulate/add_onice_players.py - About 1 hr to fix

              Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  finish: function( type ) {
                      if ( type !== false ) {
                          type = type || "fx";
                      }
                      return this.each( function() {
              Severity: Minor
              Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                Function addClass has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    addClass: function( value ) {
                        var classes, elem, cur, curValue, clazz, j, finalValue,
                            i = 0;
                
                        if ( jQuery.isFunction( value ) ) {
                Severity: Minor
                Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                  Function getWidthOrHeight has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function getWidthOrHeight( elem, name, extra ) {
                  
                      // Start with offset property, which is equivalent to the border-box value
                      var val,
                          valueIsBorderBox = true,
                  Severity: Minor
                  Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                    Function parseHTML has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    jQuery.parseHTML = function( data, context, keepScripts ) {
                        if ( typeof data !== "string" ) {
                            return [];
                        }
                        if ( typeof context === "boolean" ) {
                    Severity: Minor
                    Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                      Function off has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          off: function( types, selector, fn ) {
                              var handleObj, type;
                              if ( types && types.preventDefault && types.handleObj ) {
                      
                                  // ( event )  dispatched jQuery.Event
                      Severity: Minor
                      Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                        Function off has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            off: function( types, selector, fn ) {
                                var handleObj, type;
                                if ( types && types.preventDefault && types.handleObj ) {
                        
                                    // ( event )  dispatched jQuery.Event
                        Severity: Minor
                        Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

                          Function parseHTML has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          jQuery.parseHTML = function( data, context, keepScripts ) {
                              if ( typeof data !== "string" ) {
                                  return [];
                              }
                              if ( typeof context === "boolean" ) {
                          Severity: Minor
                          Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

                            Function getWidthOrHeight has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function getWidthOrHeight( elem, name, extra ) {
                            
                                // Start with offset property, which is equivalent to the border-box value
                                var val,
                                    valueIsBorderBox = true,
                            Severity: Minor
                            Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

                              Function addClass has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  addClass: function( value ) {
                                      var classes, elem, cur, curValue, clazz, j, finalValue,
                                          i = 0;
                              
                                      if ( jQuery.isFunction( value ) ) {
                              Severity: Minor
                              Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

                                Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    finish: function( type ) {
                                        if ( type !== false ) {
                                            type = type || "fx";
                                        }
                                        return this.each( function() {
                                Severity: Minor
                                Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

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

                                  def score_state_graph(season):
                                      """
                                      Generates a horizontal stacked bar graph showing how much 5v5 TOI each team has played in each score state
                                      for given season.
                                  
                                  
                                  Severity: Minor
                                  Found in scrapenhl2/plot/team_score_state_toi.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 team_lineup_cf_graph has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def team_lineup_cf_graph(team, **kwargs):
                                      """
                                      This method builds a 4x5 matrix of rolling CF% line graphs. The left 4x3 matrix are forward lines and the top-right
                                      3x2 are defense pairs.
                                  
                                  
                                  Severity: Minor
                                  Found in scrapenhl2/plot/team_lineup_cf.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 player_as_str has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def player_as_str(playerid, filterids=None):
                                      """
                                      A helper method. If player is int, returns string name of that player. Else returns standardized name.
                                  
                                      :param playerid: int, or str, player whose name you want to retrieve
                                  Severity: Minor
                                  Found in scrapenhl2/scrape/players.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 get_enddate_from_kwargs has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def get_enddate_from_kwargs(**kwargs):
                                      """Returns 6/21 of endseason + 1, or enddate"""
                                  
                                      if 'enddate' in kwargs:
                                          return kwargs['enddate']
                                  Severity: Minor
                                  Found in scrapenhl2/plot/visualization_helper.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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language