Showing 344 of 362 total issues
Avoid deeply nested control flow statements. Open
Open
} else if ( match[ 2 ] ) {
push.apply( results, context.getElementsByTagName( selector ) );
return results;
// Class selector
Avoid deeply nested control flow statements. Open
Open
if ( ( ofType ?
node.nodeName.toLowerCase() === name :
node.nodeType === 1 ) &&
++diff ) {
Avoid deeply nested control flow statements. Open
Open
if ( matchedSelectors[ sel ] === undefined ) {
matchedSelectors[ sel ] = handleObj.needsContext ?
jQuery( sel, this ).index( cur ) > -1 :
jQuery.find( sel, this, null, [ cur ] ).length;
}
Avoid deeply nested control flow statements. Open
Open
if ( matchedSelectors[ sel ] ) {
matchedHandlers.push( handleObj );
}
Avoid deeply nested control flow statements. Open
Open
if ( copyIsArray && !Array.isArray( src ) ) {
clone = [];
} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {
clone = {};
} else {
Avoid deeply nested control flow statements. Open
Open
if ( ofType ?
node.nodeName.toLowerCase() === name :
node.nodeType === 1 ) {
return false;
Avoid deeply nested control flow statements. Open
Open
if ( !selector ) {
push.apply( results, seed );
return results;
}
Avoid deeply nested control flow statements. Open
Open
if ( node && node.value === id ) {
return [ elem ];
}
Avoid deeply nested control flow statements. Open
Open
if ( attrs[ i ] ) {
name = attrs[ i ].name;
if ( name.indexOf( "data-" ) === 0 ) {
name = camelCase( name.slice( 5 ) );
dataAttr( elem, name, data[ name ] );
Avoid deeply nested control flow statements. Open
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
Avoid deeply nested control flow statements. Open
Open
} else if ( copy !== undefined ) {
target[ name ] = copy;
}
Avoid deeply nested control flow statements. Open
Open
for ( match in context ) {
// Properties of context are called as methods if possible
if ( isFunction( this[ match ] ) ) {
this[ match ]( context[ match ] );
Avoid deeply nested control flow statements. Open
Open
if ( restoreDisplay == null ) {
display = style.display;
restoreDisplay = display === "none" ? "" : display;
}
Function dcl_loss
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def dcl_loss(
Function mask_outliers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def mask_outliers(
Function plot_stationary_entropy
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def plot_stationary_entropy(
coordinates: coordinates,
embeddings: table_dict,
soft_counts: table_dict,
breaks: table_dict = None,
- 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 close_single_contact
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def close_single_contact(
Function climb_wall
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def climb_wall(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function _fit_hmm_range
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def _fit_hmm_range(concat_embeddings, states, min_states, max_states):
"""Auxiliary function for fitting a range of HMMs with different number of states.
Args:
concat_embeddings (np.ndarray): Concatenated embeddings across all animal experiments.
- 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"