Showing 385 of 747 total issues
File manipulate.py
has 1246 lines of code (exceeds 250 allowed). Consider refactoring. Open
import functools
import os
import os.path
import feather
Function on_success
has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring. Open
def on_success(self, data):
if 'text' in data:
print(data['text'])
if r'https://t.co/' in data['text']:
- 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 update_team_logs
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
def update_team_logs(season, force_overwrite=False, force_games=None):
"""
This method looks at the schedule for the given season and writes pbp for scraped games to file.
It also adds the strength at each pbp event to the log. It only includes games that have both PBP *and* TOI.
- 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
File visualization_helper.py
has 497 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
This method contains utilities for visualization.
"""
import numpy as np
Function performObjectSearch
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. 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;
- 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 performObjectSearch
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. 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;
- 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 Stemmer
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Stemmer = function() {
var step2list = {
ational: 'ate',
tional: 'tion',
File players.py
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
This module contains methods related to individual player info.
"""
import functools
Function _filter_for_players
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def _filter_for_players(data, **kwargs):
"""
Uses the players_on_ice, players_on_ice_for, players_on_ice_ag, acting_player, and receiving_player keyword
arguments to filter the data.
:param data: a dataframe with pbp data
- 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 defaultPrefilter
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultPrefilter( elem, props, opts ) {
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
isBox = "width" in props || "height" in props,
anim = this,
orig = {},
Function defaultPrefilter
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultPrefilter( elem, props, opts ) {
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
isBox = "width" in props || "height" in props,
anim = this,
orig = {},
Function Callbacks
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
Function Callbacks
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.Callbacks = function( options ) {
// Convert options from String-formatted to Object-formatted if needed
// (we check in cache first)
options = typeof options === "string" ?
File parse_toi.py
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
This module contains methods for parsing TOI.
"""
import os.path
Function query
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
query : function(query) {
var i;
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// stem the searchterms and add them to the correct list
Function query
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
query : function(query) {
var i;
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
// stem the searchterms and add them to the correct list
File schedules.py
has 358 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
This module contains methods related to season schedules.
"""
import arrow
Function stemWord
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
Function stemWord
has 109 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.stemWord = function (w) {
var stem;
var suffix;
var firstch;
var origword = w;
Function then
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
then: function( onFulfilled, onRejected, onProgress ) {
var maxDepth = 0;
function resolve( depth, deferred, handler, special ) {
return function() {
var that = this,