Showing 385 of 747 total issues
Function team_dpair_shot_rates_scatter
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def team_dpair_shot_rates_scatter(team, min_pair_toi=50, **kwargs):
"""
Creates a scatterplot of team defense pair shot attempr rates.
:param team: int or str, 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 generate_team_ids_file
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def generate_team_ids_file(teamids=None):
"""
Reads all team id URLs and stores information to disk. Has the following information:
- ID: int
- 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 clone
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var i, l, srcElements, destElements,
clone = elem.cloneNode( true ),
inPage = jQuery.contains( elem.ownerDocument, elem );
Function getComments
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getComments(id) {
$.ajax({
type: 'GET',
url: opts.getCommentsURL,
data: {node: id},
Function propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
Function propFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;
// camelCase, specialEasing and expand cssHook pass
for ( index in props ) {
Function getComments
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getComments(id) {
$.ajax({
type: 'GET',
url: opts.getCommentsURL,
data: {node: id},
Function clone
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var i, l, srcElements, destElements,
clone = elem.cloneNode( true ),
inPage = jQuery.contains( elem.ownerDocument, elem );
Function offset
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
offset: function( options ) {
// Preserve chaining for setter
if ( arguments.length ) {
return options === undefined ?
Function remove
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function( owner, key ) {
var i,
cache = owner[ this.expando ];
if ( cache === undefined ) {
Function when
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
when: function( singleValue ) {
var
// count of uncompleted subordinates
remaining = arguments.length,
Function speed
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.speed = function( speed, easing, fn ) {
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
Function offset
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
offset: function( options ) {
// Preserve chaining for setter
if ( arguments.length ) {
return options === undefined ?
Function speed
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.speed = function( speed, easing, fn ) {
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
Function when
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
when: function( singleValue ) {
var
// count of uncompleted subordinates
remaining = arguments.length,
Function remove
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function( owner, key ) {
var i,
cache = owner[ this.expando ];
if ( cache === undefined ) {
Consider simplifying this complex logical expression. Open
Open
if ( support.matchesSelector && documentIsHTML &&
!compilerCache[ expr + " " ] &&
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
Consider simplifying this complex logical expression. Open
Open
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
support.getById && context.nodeType === 9 && documentIsHTML &&
Expr.relative[ tokens[1].type ] ) {
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
Consider simplifying this complex logical expression. Open
Open
if ( support.matchesSelector && documentIsHTML &&
!compilerCache[ expr + " " ] &&
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
Consider simplifying this complex logical expression. Open
Open
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
support.getById && context.nodeType === 9 && documentIsHTML &&
Expr.relative[ tokens[1].type ] ) {
context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];