muneebalam/scrapenhl2

View on GitHub

Showing 385 of 747 total issues

Avoid deeply nested control flow statements.
Open

                            if ( !(unmatched[i] || setMatched[i]) ) {
                                setMatched[i] = pop.call( results );
                            }
Severity: Major
Found in docs/build/_static/jquery-3.1.0.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if ( matches[ sel ] ) {
                                matches.push( handleObj );
                            }
    Severity: Major
    Found in docs/build/_static/jquery-3.1.0.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if ( conv && s.throws ) {
                              response = conv( response );
                          } else {
                              try {
                                  response = conv( response );
      Severity: Major
      Found in docs/build/_static/jquery-3.1.0.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/build/_static/jquery-3.1.0.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/build/_static/jquery-3.1.0.js - About 45 mins to fix

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

            function on( elem, types, selector, data, fn, one ) {
            Severity: Minor
            Found in docs/build/_static/jquery-3.1.0.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if ( Expr.relative[ tokens[j].type ] ) {
                                      break;
                                  }
              Severity: Major
              Found in docs/build/_static/jquery-3.1.0.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                            if (!allfound) {
                              continue;
                            }
                Severity: Major
                Found in docs/build/_static/searchtools.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if ( nodeType === 9 ) {
                                          if ( (elem = context.getElementById( m )) ) {
                  
                                              // Support: IE, Opera, Webkit
                                              // TODO: identify versions
                  Severity: Major
                  Found in docs/build/_static/jquery-3.1.0.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/build/_static/jquery-3.1.0.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                      } else if ( copy !== undefined ) {
                                          target[ name ] = copy;
                                      }
                      Severity: Major
                      Found in docs/build/_static/jquery-3.1.0.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( nid === expando ) {
                                                    context.removeAttribute( "id" );
                                                }
                        Severity: Major
                        Found in docs/build/_static/jquery-3.1.0.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                              if ( ofType ?
                                                                  node.nodeName.toLowerCase() === name :
                                                                  node.nodeType === 1 ) {
                          
                                                                  return false;
                          Severity: Major
                          Found in docs/build/_static/jquery-3.1.0.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
                                                        cur = cur.replace( " " + clazz + " ", " " );
                                                    }
                            Severity: Major
                            Found in docs/build/_static/jquery-3.1.0.js - About 45 mins to fix

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

                              def add_score_adjustment_to_team_pbp(df):
                                  """
                                  Adds AdjFF and AdjFA
                              
                                  :param df: dataframe
                              Severity: Minor
                              Found in scrapenhl2/manipulate/manipulate.py - 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

                                                  for p in playersonice:
                                                      querystrings.append('{0:s}{1:s} == {2:d}'.format(hr, suf, p))
                                          querystring = ' | '.join(querystrings)
                              Severity: Major
                              Found in scrapenhl2/manipulate/manipulate.py - About 45 mins to fix

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

                                def _get_contiguous_times(times, tolerance=2):
                                    """
                                    Returns tuples of start and end times inferred from list of all times.
                                
                                    For example, [1, 2, 3, 5, 6, 7, 10] would yield ((1, 3), (5, 7), (10, 10))
                                Severity: Minor
                                Found in scrapenhl2/plot/game_timeline.py - 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

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

                                def find_playoff_game(searchstr):
                                    """
                                    Finds playoff game id based on string specified
                                    :param searchstr: e.g. WSH PIT 2016 Game 5
                                    :return: (season, game)
                                Severity: Minor
                                Found in scrapenhl2/scrape/games.py - 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

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

                                def read_shifts_from_html_pages(rawtoi1, rawtoi2, teamid1, teamid2, season, game):
                                Severity: Minor
                                Found in scrapenhl2/scrape/parse_toi.py - About 45 mins to fix

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

                                  def update_player_log_file(playerids, seasons, games, teams, statuses):
                                      """
                                      Updates the player log file with given players. The player log file notes which players played in which games
                                      and whether they were scratched or played.
                                  
                                  
                                  Severity: Minor
                                  Found in scrapenhl2/scrape/players.py - 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language