Showing 385 of 747 total issues
Function generic_5v5_log_graph_title
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
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]
- 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 style
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Function style
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Function parallel_coords_team_comparison
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parallel_coords_team_comparison(**kwargs):
"""
:param kwargs:
Function rolling_player_boxcars
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def rolling_player_boxcars(player, **kwargs):
"""
A method to generate the rolling boxcars graph.
:param player: str or int, player to generate for
Function _rolling_player_f
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Function parallel_usage_chart
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parallel_usage_chart(**kwargs):
"""
:param kwargs: Defaults to take last month of games for all teams.
Function setOffset
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setOffset: function( elem, options, i ) {
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
position = jQuery.css( elem, "position" ),
curElem = jQuery( elem ),
props = {};
Function setOffset
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setOffset: function( elem, options, i ) {
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
position = jQuery.css( elem, "position" ),
curElem = jQuery( elem ),
props = {};
Consider simplifying this complex logical expression. Open
Open
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
// Trust units reported by jQuery.css
unit = unit || initialInUnit[ 3 ];
Consider simplifying this complex logical expression. Open
Open
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
// Trust units reported by jQuery.css
unit = unit || initialInUnit[ 3 ];
Function showHide
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function showHide( elements, show ) {
var display, elem,
values = [],
index = 0,
length = elements.length;
Function showHide
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function showHide( elements, show ) {
var display, elem,
values = [],
index = 0,
length = elements.length;
Function scrape_season_toi
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
def scrape_season_toi(season, force_overwrite=False):
"""
Scrapes and parses toi from the given season.
: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 removeClass
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
removeClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( jQuery.isFunction( value ) ) {
Function handlers
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handlers: function( event, handlers ) {
var i, matches, sel, handleObj,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;
Function load
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.fn.load = function( url, params, callback ) {
var selector, type, response,
self = this,
off = url.indexOf( " " );
Function handlers
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handlers: function( event, handlers ) {
var i, matches, sel, handleObj,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;
Function removeClass
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
removeClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( jQuery.isFunction( value ) ) {
Function load
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.fn.load = function( url, params, callback ) {
var selector, type, response,
self = this,
off = url.indexOf( " " );