Showing 316 of 340 total issues
Function InlineEditManager
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
var InlineEditManager = function()
{
// values in the default config are dummy - just to illustrate the concept
var config = {
endpoint_save: '/save_message/',
- 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 gather_muts_and_sites
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def gather_muts_and_sites(
self, mutations: BaseQuery, sites: BaseQuery,
show_progress=True, occurrences_in: List[MutationSource] = None, intersection=None
) -> MotifsData:
"""If occurrences_in is provided, the count of mutations will
- 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 manager.py
has 322 lines of code (exceeds 250 allowed). Consider refactoring. Open
import re
from collections import namedtuple, defaultdict
from sqlalchemy import and_
Function init_nodes
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init_nodes(vis, nodes_data, created_nodes)
{
tooltip = init_tooltips()
nodes = vis.selectAll('.node')
File __init__.py
has 320 lines of code (exceeds 250 allowed). Consider refactoring. Open
import gc
import gzip
from abc import abstractmethod
from collections import defaultdict
from typing import List, Iterable
Function ProteinForm
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ProteinForm = (function ()
{
var element
var empty_indicator, no_results_indicator, waiting_indicator
var result_ul, recent_value, protein_search
File basic_filter.py
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
import operator
from functools import lru_cache
from types import MethodType
from sqlalchemy.ext.associationproxy import AssociationProxyInstance
Function count_ptm
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def count_ptm(
counter, site_types: Iterable[models.SiteType] = tuple(), models=None,
only_primary=False, site_mode='any',
custom_filters=None,
custom_joins=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 MutationTable
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
var MutationTable = function ()
{
var element
var mutations
var impact_importances = {}
- 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 import_genome_proteome_mappings
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def import_genome_proteome_mappings(
proteins: Dict[str, Protein],
mappings_dir='data/200616/all_variants/playground',
mappings_file_pattern='annot_*.txt.gz',
bdb_dir=''
- 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 as_sqlalchemy
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def as_sqlalchemy(self, target):
value = self.mapped_value
if value is 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
File assets.py
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
from flask_assets import Bundle
from abc import ABC, abstractmethod
from flask import Markup
Function ShortURL
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
var ShortURL = function()
{
// values in the default config are dummy - just to illustrate the concept
var config = {
endpoint_get: '/get_shorthand_for_url_provided_in_get/',
MutationImporter
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class MutationImporter(BioImporter, MutationExporter):
@abstract_property
def name(self):
"""Name of the mutations importer"""
Function init_tinymce
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init_tinymce(config)
{
var default_config = {
selector: 'textarea',
body_class: 'page-content',
Function Widgets
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Widgets = (function () {
var form
var select_sth_popover = {
content: 'You should select at least one option',
placement: 'top',
Function import_aminoacid_mutation_refseq_mappings
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def import_aminoacid_mutation_refseq_mappings(
proteins: Dict[str, Protein],
mappings_dir='data/200616/all_variants/playground',
mappings_file_pattern='annot_*.txt.gz',
bdb_dir=''
- 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 __init__
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, domains):
tracks = OrderedDict()
grouped_domains = self.group_domains(domains)
- 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 basic_auto_migrate_relational_db
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def basic_auto_migrate_relational_db(app, bind: str):
"""Inspired by http://stackoverflow.com/questions/2103274/"""
from sqlalchemy import Table
from sqlalchemy import MetaData
- 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 ForceManager
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ForceManager(config)
{
var force_affected_nodes = [];
var force_affected_links = [];
var force;