Showing 385 of 747 total issues
Function CHILD
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
"CHILD": function( type, what, argument, first, last ) {
Function buildFragment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function buildFragment( elems, context, scripts, selection, ignored ) {
Function augmentWidthOrHeight
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
Function Tween
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function Tween( elem, options, prop, end, easing ) {
Function add
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
add: function( elem, types, handler, data, selector ) {
Function rolling_f_graph_plotly
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def rolling_f_graph_plotly(playerid, startdate, enddate, roll_len, gfcf):
Function _combo_corsi_from_hrcodes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _combo_corsi_from_hrcodes(homedf=None, roaddf=None, corsidf=None, cfca=None, *hrcodes):
Function parallel_coords
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def parallel_coords(backgrounddf, foregrounddf, groupcol, legendcol=None, axis=None):
Function add_onice_players_to_df
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_onice_players_to_df(df, focus_team, season, gamecol, player_output='ids'):
Function add_good_bad_fast_slow
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_good_bad_fast_slow(margin=0.05, bottomleft='Slower', bottomright='Better', topleft='Worse', topright='Faster'):
Function get_game_combo_corsi
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_game_combo_corsi(season, game, player_n=2, cfca=None, *hrcodes):
Function update_player_log_file
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_player_log_file(playerids, seasons, games, teams, statuses):
Function labelLine
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def labelLine(line, x, label=None, align=True, **kwargs):
Function player_graph
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def player_graph(playerid, startdate, enddate, graphtype, roll_len):
Function highlightText
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
jQuery.fn.highlightText = function(text, className) {
function highlight(node) {
if (node.nodeType == 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
- Read upRead up
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_as_id
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def team_as_id(team):
"""
A helper method. If team entered is int, returns that. If team is str, returns integer id of that team.
:param team: int, or str
- Read upRead up
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_5v5_player_log
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def generate_5v5_player_log(season):
"""
Takes the play by play and adds player 5v5 info to the master player log file, noting TOI, CF, etc.
This takes awhile because it has to calculate TOICOMP.
:param season: int, the season
- Read upRead up
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 _filter_for_games
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _filter_for_games(data, **kwargs):
"""
Uses the start_game, end_game, and season_types keyword arguments to filter the data.
:param data: a dataframe with pbp data
:param kwargs: kwargs as given to get_pbp_events, for example
- Read upRead up
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 write_team_toi
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def write_team_toi(toi, season, team):
"""
Writes team TOI log to file
:param toi: df, team toi for this season
- Read upRead up
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_5v5_player_game_fa
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _get_5v5_player_game_fa(season, team, gc):
"""
A helper method for get_5v5_player_game_cfca and _gfga.
:param season: int, the season
- Read upRead up
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"