Showing 385 of 747 total issues
Function deleteComment
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function deleteComment(id) {
$.ajax({
type: 'POST',
url: opts.deleteCommentURL,
data: {id: id},
Function attr
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
attr: function( elem, name, value ) {
var ret, hooks,
nType = elem.nodeType;
// Don't get/set attributes on text, comment and attribute nodes
Function deleteComment
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function deleteComment(id) {
$.ajax({
type: 'POST',
url: opts.deleteCommentURL,
data: {id: id},
Function attr
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
attr: function( elem, name, value ) {
var ret, hooks,
nType = elem.nodeType;
// Don't get/set attributes on text, comment and attribute nodes
Function _game_h2h_chart
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _game_h2h_chart(season, game, corsi, toi, orderh, orderr, numf_h=None, numf_r=None, save_file=None):
Function add_players_to_file
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_players_to_file(filename, focus_team, season=None, gamecol='Game', periodcol='Period', timecol='Time',
Function finish
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each( function() {
Function addClass
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
addClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( jQuery.isFunction( value ) ) {
Function getWidthOrHeight
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getWidthOrHeight( elem, name, extra ) {
// Start with offset property, which is equivalent to the border-box value
var val,
valueIsBorderBox = true,
Function parseHTML
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.parseHTML = function( data, context, keepScripts ) {
if ( typeof data !== "string" ) {
return [];
}
if ( typeof context === "boolean" ) {
Function off
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
off: function( types, selector, fn ) {
var handleObj, type;
if ( types && types.preventDefault && types.handleObj ) {
// ( event ) dispatched jQuery.Event
Function off
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
off: function( types, selector, fn ) {
var handleObj, type;
if ( types && types.preventDefault && types.handleObj ) {
// ( event ) dispatched jQuery.Event
Function parseHTML
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.parseHTML = function( data, context, keepScripts ) {
if ( typeof data !== "string" ) {
return [];
}
if ( typeof context === "boolean" ) {
Function getWidthOrHeight
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getWidthOrHeight( elem, name, extra ) {
// Start with offset property, which is equivalent to the border-box value
var val,
valueIsBorderBox = true,
Function addClass
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
addClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( jQuery.isFunction( value ) ) {
Function finish
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each( function() {
Function score_state_graph
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def score_state_graph(season):
"""
Generates a horizontal stacked bar graph showing how much 5v5 TOI each team has played in each score state
for given 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 team_lineup_cf_graph
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def team_lineup_cf_graph(team, **kwargs):
"""
This method builds a 4x5 matrix of rolling CF% line graphs. The left 4x3 matrix are forward lines and the top-right
3x2 are defense pairs.
- 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 player_as_str
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def player_as_str(playerid, filterids=None):
"""
A helper method. If player is int, returns string name of that player. Else returns standardized name.
:param playerid: int, or str, player whose name you want to retrieve
- 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_enddate_from_kwargs
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def get_enddate_from_kwargs(**kwargs):
"""Returns 6/21 of endseason + 1, or enddate"""
if 'enddate' in kwargs:
return kwargs['enddate']
- 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"