Showing 316 of 340 total issues
Function mutations_affecting_ptm_sites
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def mutations_affecting_ptm_sites(f, sources):
header = [
'gene',
'refseq',
- 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 tsv_file_iterator
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def tsv_file_iterator(
filename, file_header=None, file_opener=open, mode='r',
skip=None, limit=None, sep='\t'
):
data_lines_count = count_lines_tsv(filename, file_opener=file_opener, mode=mode)
- 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 cache_decorator
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def cache_decorator(cache: Cache) -> Callable:
"""Create a decorator caching results of the function calls.
The cache is specific to the function name and provided arguments.
- 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 htmlwidget
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def htmlwidget(interactive_plot, args):
knitr_output = htmlwidgets.knit_print_htmlwidget(interactive_plot, standalone=False)
html = list(knitr_output)[0].replace('<!--html_preserve-->', '').replace('<!--/html_preserve-->', '')
deps = base.attr(knitr_output, 'knit_meta')
javascript = ''
- 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 Progress
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Progress()
{
var url;
var progress_span, progress_bar;
var state_failure, state_progress, state_pending;
Function multilinePlaceholderPolyfill
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
var multilinePlaceholderPolyfill = (function()
{
// allows to use multiline placeholders if textarea is given as field,
// or imitates normal placeholders if an input is given as field
var field
Function init
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function(data)
{
update_object(config, data)
var box = $(data.box)
input = box.find('input')
Function create_nodes
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function create_nodes(data)
{
groups = data.kinase_groups;
central_node = createProteinNode(data.protein);
Function SearchBar
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
var SearchBar = function ()
{
var input
var results_div
var current_query
- 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 saveMessage
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
function saveMessage(editable_box)
{
$.ajax({
url: config.endpoint_save,
type: 'POST',
Function checkbox_list
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function checkbox_list(uls)
{
function block(ul)
{
ul.popover('show');
Function prepareSites
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function prepareSites(sites, standalone_kinases)
{
var cloned_kinases = []
function parse(site)
Function _setZoomAndMove
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _setZoomAndMove(new_zoom, new_pos, stop_callback, skip_animation, center_view)
{
new_pos = trim_position(new_pos, new_zoom)
var styles = scalableElem.style;
Function initTable
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function initTable($table, query, additional_columns)
{
var initial_query = query
function detailFormatter(index, row, $element)
- 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 resolve_import_order
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def resolve_import_order(self):
# make a copy of importers list
unordered = self.importers[:]
ordered = []
- 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 ProteinForm
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
var ProteinForm = (function ()
{
var element
var empty_indicator, no_results_indicator, waiting_indicator
var result_ul, recent_value, protein_search
- 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 divide_muts_by_sites
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def divide_muts_by_sites(mutations, sites):
"""Aggregates mutations that are within +/-7 positions from sites by site"""
from collections import defaultdict
muts_by_site = defaultdict(list)
- 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 best_uniprot_entry
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def best_uniprot_entry(self) -> UniprotEntry:
if self.external_references:
entries = self.external_references.uniprot_entries
if not entries:
return 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 joined_query
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def joined_query(query, required_joins, limit_to=None):
already_joined = set()
for joins in required_joins:
for join in joins:
if limit_to and join not in limit_to:
- 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_filters
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def select_filters(filters, models):
"""Selects filters which are applicable to at least one of given models."""
selected = set()
tables = [model.__table__ for model in models]
- 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"