Showing 344 of 362 total issues
Function edit_arenas
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def edit_arenas(
self, videos: list = None, arena_type: str = None, verbose: bool = True
): # pragma: no cover
"""Tag the arena in the videos.
- 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 call
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def call(self, inputs, training=False): # pragma: no cover
"""Compute the output of the layer."""
z_gauss_mean = self.z_gauss_mean(inputs)
z_gauss_var = self.z_gauss_var(inputs)
- 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 highlight
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
Function preprocess
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def preprocess(
Function condition_distance_binning
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def condition_distance_binning(
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function ajaxHandleResponses
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ajaxHandleResponses( s, jqXHR, responses ) {
var ct, type, finalDataType, firstDataType,
contents = s.contents,
dataTypes = s.dataTypes;
Function _displayItem
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
const _displayItem = (item, searchTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
Function kleinberg
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
def kleinberg(
offsets: list, s: float = np.e, gamma: float = 1.0, n=None, T=None, k=None
):
"""Apply Kleinberg's algorithm (described in 'Bursty and Hierarchical Structure in Streams').
Function boxModelAdjustment
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {
var i = dimension === "width" ? 1 : 0,
extra = 0,
delta = 0;
Function objectSearchCallback
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const objectSearchCallback = (prefix, match) => {
const name = match[4]
const fullname = (prefix ? prefix + "." : "") + name;
const fullnameLower = fullname.toLowerCase();
if (fullnameLower.indexOf(object) < 0) return;
Function mightThrow
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
mightThrow = function() {
var returned, then;
// Support: Promises/A+ section 2.3.3.3.3
// https://promisesaplus.com/#point-59
Function create
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def create(
self,
verbose: bool = True,
force: bool = False,
debug: bool = True,
- 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 automatically_recognize_arena
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def automatically_recognize_arena(
coordinates: coordinates,
tables: table_dict,
videos: list,
vid_index: 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 getWidthOrHeight
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getWidthOrHeight( elem, dimension, extra ) {
// Start with computed style
var styles = getStyles( elem ),
Function __init__
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(
self,
animal_ids: List = None,
arena: str = "polygonal-autodetect",
bodypart_graph: Union[str, dict] = "deepof_14",
Function initOnKeyListeners
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
initOnKeyListeners: () => {
// only install a listener if it is really needed
if (
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
Function plot_distance_between_conditions
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_distance_between_conditions(
Function sniff_object
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def sniff_object(
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(