Showing 385 of 747 total issues
Avoid deeply nested control flow statements. Open
if ( !(unmatched[i] || setMatched[i]) ) {
setMatched[i] = pop.call( results );
}
Avoid deeply nested control flow statements. Open
if ( matches[ sel ] ) {
matches.push( handleObj );
}
Avoid deeply nested control flow statements. Open
if ( conv && s.throws ) {
response = conv( response );
} else {
try {
response = conv( response );
Avoid deeply nested control flow statements. Open
if ( ( event.result = ret ) === false ) {
event.preventDefault();
event.stopPropagation();
}
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
Function on
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function on( elem, types, selector, data, fn, one ) {
Avoid deeply nested control flow statements. Open
if ( Expr.relative[ tokens[j].type ] ) {
break;
}
Avoid deeply nested control flow statements. Open
if (!allfound) {
continue;
}
Avoid deeply nested control flow statements. Open
if ( nodeType === 9 ) {
if ( (elem = context.getElementById( m )) ) {
// Support: IE, Opera, Webkit
// TODO: identify versions
Function init
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
init: function( elem, options, prop, end, easing, unit ) {
Avoid deeply nested control flow statements. Open
} else if ( copy !== undefined ) {
target[ name ] = copy;
}
Avoid deeply nested control flow statements. Open
if ( nid === expando ) {
context.removeAttribute( "id" );
}
Avoid deeply nested control flow statements. Open
if ( ofType ?
node.nodeName.toLowerCase() === name :
node.nodeType === 1 ) {
return false;
Avoid deeply nested control flow statements. Open
while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
cur = cur.replace( " " + clazz + " ", " " );
}
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
- 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
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)
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))
- 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 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)
- 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 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):
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.
- 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"