muneebalam/scrapenhl2

View on GitHub

Showing 385 of 747 total issues

Function generic_5v5_log_graph_title has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

def generic_5v5_log_graph_title(figtype, **kwargs):
    """
    Generates a figure title incorporating parameters from kwargs:

    [Fig type] for [player, or multiple players, or team]
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

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

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

      Function parallel_coords_team_comparison has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def parallel_coords_team_comparison(**kwargs):
          """
      
          :param kwargs:
      
      
      Severity: Minor
      Found in scrapenhl2/plot/usage.py - About 1 hr to fix

        Function rolling_player_boxcars has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def rolling_player_boxcars(player, **kwargs):
            """
            A method to generate the rolling boxcars graph.
        
            :param player: str or int, player to generate for
        Severity: Minor
        Found in scrapenhl2/plot/rolling_boxcars.py - About 1 hr to fix

          Function _rolling_player_f has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          def _rolling_player_f(player, gfcf, **kwargs):
              """
              Creates a graph with CF% or GF% (on plus off). Use gfcf to indicate which one.
          
              :param player: str or int, player to generate for
          Severity: Minor
          Found in scrapenhl2/plot/rolling_cf_gf.py - About 1 hr to fix

            Function parallel_usage_chart has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            def parallel_usage_chart(**kwargs):
                """
            
                :param kwargs: Defaults to take last month of games for all teams.
            
            
            Severity: Minor
            Found in scrapenhl2/plot/usage.py - About 1 hr to fix

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

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

                  Consider simplifying this complex logical expression.
                  Open

                      if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
                  
                          // Trust units reported by jQuery.css
                          unit = unit || initialInUnit[ 3 ];
                  
                  
                  Severity: Critical
                  Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                        if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
                    
                            // Trust units reported by jQuery.css
                            unit = unit || initialInUnit[ 3 ];
                    
                    
                    Severity: Critical
                    Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

                      Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function showHide( elements, show ) {
                          var display, elem,
                              values = [],
                              index = 0,
                              length = elements.length;
                      Severity: Minor
                      Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                        Function showHide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function showHide( elements, show ) {
                            var display, elem,
                                values = [],
                                index = 0,
                                length = elements.length;
                        Severity: Minor
                        Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

                          Function scrape_season_toi has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                          def scrape_season_toi(season, force_overwrite=False):
                              """
                              Scrapes and parses toi from the given season.
                          
                              :param season: int, the season
                          Severity: Minor
                          Found in scrapenhl2/scrape/scrape_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 removeClass has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              removeClass: 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 handlers has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                handlers: function( event, handlers ) {
                                    var i, matches, sel, handleObj,
                                        handlerQueue = [],
                                        delegateCount = handlers.delegateCount,
                                        cur = event.target;
                            Severity: Minor
                            Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                              Function load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              jQuery.fn.load = function( url, params, callback ) {
                                  var selector, type, response,
                                      self = this,
                                      off = url.indexOf( " " );
                              
                              
                              Severity: Minor
                              Found in docs/build/html/_static/jquery-3.1.0.js - About 1 hr to fix

                                Function handlers has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    handlers: function( event, handlers ) {
                                        var i, matches, sel, handleObj,
                                            handlerQueue = [],
                                            delegateCount = handlers.delegateCount,
                                            cur = event.target;
                                Severity: Minor
                                Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix

                                  Function removeClass has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      removeClass: 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 load has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    jQuery.fn.load = function( url, params, callback ) {
                                        var selector, type, response,
                                            self = this,
                                            off = url.indexOf( " " );
                                    
                                    
                                    Severity: Minor
                                    Found in docs/build/_static/jquery-3.1.0.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language