Showing 385 of 747 total issues
Function remove
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function( elem, types, handler, selector, mappedTypes ) {
var j, origCount, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
Function remove
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
remove: function( elem, types, handler, selector, mappedTypes ) {
var j, origCount, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
Function performObjectSearch
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var docnames = this._index.docnames;
var objects = this._index.objects;
var objnames = this._index.objnames;
Function buildFragment
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildFragment( elems, context, scripts, selection, ignored ) {
var elem, tmp, tag, wrap, contains, j,
fragment = context.createDocumentFragment(),
nodes = [],
i = 0,
Function buildFragment
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildFragment( elems, context, scripts, selection, ignored ) {
var elem, tmp, tag, wrap, contains, j,
fragment = context.createDocumentFragment(),
nodes = [],
i = 0,
Function performObjectSearch
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
performObjectSearch : function(object, otherterms) {
var filenames = this._index.filenames;
var docnames = this._index.docnames;
var objects = this._index.objects;
var objnames = this._index.objnames;
Function _finish_toidf_manipulations
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def _finish_toidf_manipulations(df, season, game):
"""
Takes dataframe of shifts (one row per shift) and makes into a matrix of players on ice for each second.
:param df: dataframe
Consider simplifying this complex logical expression. Open
Open
if ( ( mappedTypes || origType === handleObj.origType ) &&
( !handler || handler.guid === handleObj.guid ) &&
( !tmp || tmp.test( handleObj.namespace ) ) &&
( !selector || selector === handleObj.selector ||
selector === "**" && handleObj.selector ) ) {
Consider simplifying this complex logical expression. Open
Open
if ( ( mappedTypes || origType === handleObj.origType ) &&
( !handler || handler.guid === handleObj.guid ) &&
( !tmp || tmp.test( handleObj.namespace ) ) &&
( !selector || selector === handleObj.selector ||
selector === "**" && handleObj.selector ) ) {
Function initEvents
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initEvents() {
$(document).on("click", 'a.comment-close', function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
});
Function initEvents
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initEvents() {
$(document).on("click", 'a.comment-close', function(event) {
event.preventDefault();
hide($(this).attr('id').substring(2));
});
Function team_as_str
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
def team_as_str(team, abbreviation=True):
"""
A helper method. If team entered is str, returns that. If team is int, returns string name of that team.
:param team: int, or str
- 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 select
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( (selector = compiled.selector || selector) );
Function select
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( (selector = compiled.selector || selector) );
Function matcherFromTokens
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
Function tokenize
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[ selector + " " ];
Function tokenize
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[ selector + " " ];
Function matcherFromTokens
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matcherFromTokens( tokens ) {
var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
Function addComment
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addComment(form) {
var node_id = form.find('input[name="node"]').val();
var parent_id = form.find('input[name="parent"]').val();
var text = form.find('textarea[name="comment"]').val();
var proposal = form.find('textarea[name="proposal"]').val();
Function data
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data: function( key, value ) {
var i, name, data,
elem = this[ 0 ],
attrs = elem && elem.attributes;