muneebalam/scrapenhl2

View on GitHub

Showing 385 of 747 total issues

Function then has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                then: function( onFulfilled, onRejected, onProgress ) {
                    var maxDepth = 0;
                    function resolve( depth, deferred, handler, special ) {
                        return function() {
                            var that = this,
Severity: Major
Found in docs/build/_static/jquery-3.1.0.js - About 4 hrs to fix

    Function Animation has 92 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function Animation( elem, properties, options ) {
        var result,
            stopped,
            index = 0,
            length = Animation.prefilters.length,
    Severity: Major
    Found in docs/build/html/_static/jquery-3.1.0.js - About 3 hrs to fix

      Function Animation has 92 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Animation( elem, properties, options ) {
          var result,
              stopped,
              index = 0,
              length = Animation.prefilters.length,
      Severity: Major
      Found in docs/build/_static/jquery-3.1.0.js - About 3 hrs to fix

        Function game_timeline has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

        def game_timeline(season, game, save_file=None):
            """
            Creates a shot attempt timeline as seen on @muneebalamcu
        
            :param season: int, the season
        Severity: Minor
        Found in scrapenhl2/plot/game_timeline.py - About 3 hrs 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 _finish_toidf_manipulations has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

        def _finish_toidf_manipulations(df, season, game):
            """
            Takes dataframe of shifts (one row per shift) and makes into a matrix of players on ice for each second.
        
            :param df: dataframe
        Severity: Minor
        Found in scrapenhl2/scrape/parse_toi.py - About 3 hrs 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 trigger has 87 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            trigger: function( event, data, elem, onlyHandlers ) {
        
                var i, cur, tmp, bubbleType, ontype, handle, special,
                    eventPath = [ elem || document ],
                    type = hasOwn.call( event, "type" ) ? event.type : event,
        Severity: Major
        Found in docs/build/html/_static/jquery-3.1.0.js - About 3 hrs to fix

          Function trigger has 87 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              trigger: function( event, data, elem, onlyHandlers ) {
          
                  var i, cur, tmp, bubbleType, ontype, handle, special,
                      eventPath = [ elem || document ],
                      type = hasOwn.call( event, "type" ) ? event.type : event,
          Severity: Major
          Found in docs/build/_static/jquery-3.1.0.js - About 3 hrs to fix

            File general_helpers.py has 306 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """
            This module contains general helper methods. None of these methods have dependencies on other scrapenhl2 modules.
            """
            
            import functools
            Severity: Minor
            Found in scrapenhl2/scrape/general_helpers.py - About 3 hrs to fix

              Function CHILD has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      "CHILD": function( type, what, argument, first, last ) {
                          var simple = type.slice( 0, 3 ) !== "nth",
                              forward = type.slice( -4 ) !== "last",
                              ofType = what === "of-type";
              
              
              Severity: Major
              Found in docs/build/html/_static/jquery-3.1.0.js - About 3 hrs to fix

                Function CHILD has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        "CHILD": function( type, what, argument, first, last ) {
                            var simple = type.slice( 0, 3 ) !== "nth",
                                forward = type.slice( -4 ) !== "last",
                                ofType = what === "of-type";
                
                
                Severity: Major
                Found in docs/build/_static/jquery-3.1.0.js - About 3 hrs to fix

                  Function _game_h2h_chart has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def _game_h2h_chart(season, game, corsi, toi, orderh, orderr, numf_h=None, numf_r=None, save_file=None):
                      """
                      This method actually does the plotting for game_h2h
                  
                      :param season: int, the season
                  Severity: Minor
                  Found in scrapenhl2/plot/game_h2h.py - About 3 hrs 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_game_h2h_corsi has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def get_game_h2h_corsi(season, games, cfca=None):
                      """
                      This method gets H2H Corsi at 5v5 for the given game(s).
                  
                      :param season: int, the season
                  Severity: Minor
                  Found in scrapenhl2/manipulate/manipulate.py - About 3 hrs 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 send has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              send: function( headers, complete ) {
                                  var i,
                                      xhr = options.xhr();
                  
                                  xhr.open(
                  Severity: Major
                  Found in docs/build/html/_static/jquery-3.1.0.js - About 3 hrs to fix

                    Function send has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                send: function( headers, complete ) {
                                    var i,
                                        xhr = options.xhr();
                    
                                    xhr.open(
                    Severity: Major
                    Found in docs/build/_static/jquery-3.1.0.js - About 3 hrs to fix

                      Function update_schedule_with_result_using_pbp has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                      Open

                      def update_schedule_with_result_using_pbp(pbp, season, game):
                          """
                          Uses the PbP to update results for this game.
                      
                          :param pbp: json, the pbp for this game
                      Severity: Minor
                      Found in scrapenhl2/scrape/manipulate_schedules.py - About 2 hrs 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 splitChars has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var splitChars = (function() {
                          var result = {};
                          var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
                               1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
                               2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
                      Severity: Major
                      Found in docs/build/html/_static/searchtools.js - About 2 hrs to fix

                        Function add has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            add: function( elem, types, handler, data, selector ) {
                        
                                var handleObjIn, eventHandle, tmp,
                                    events, t, handleObj,
                                    special, handlers, type, namespaces, origType,
                        Severity: Major
                        Found in docs/build/html/_static/jquery-3.1.0.js - About 2 hrs to fix

                          Function matcherFromGroupMatchers has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                              var bySet = setMatchers.length > 0,
                                  byElement = elementMatchers.length > 0,
                                  superMatcher = function( seed, context, xml, results, outermost ) {
                                      var elem, j, matcher,
                          Severity: Major
                          Found in docs/build/html/_static/jquery-3.1.0.js - About 2 hrs to fix

                            Function matcherFromGroupMatchers has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
                                var bySet = setMatchers.length > 0,
                                    byElement = elementMatchers.length > 0,
                                    superMatcher = function( seed, context, xml, results, outermost ) {
                                        var elem, j, matcher,
                            Severity: Major
                            Found in docs/build/_static/jquery-3.1.0.js - About 2 hrs to fix

                              Function splitChars has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var splitChars = (function() {
                                  var result = {};
                                  var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
                                       1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
                                       2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
                              Severity: Major
                              Found in docs/build/_static/searchtools.js - About 2 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language