Function run_active_driver
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def run_active_driver(sequences, disorder, mutations, sites, mc_cores=None, progress_bar=True, **kwargs):
Function create_gene_list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def create_gene_list(name: str, list_data: DataFrame, mutation_source: MutationSource = None) -> GeneList:
gene_list, created = get_or_create(GeneList, name=name)
if not created:
for old_entry in gene_list.entries:
- 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 save_all
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def save_all(analysis_name: str, data, base_path=None):
if base_path:
path = base_path / analysis_name
else:
base_path = ANALYSES_OUTPUT_PATH
- 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 series_from_preferred_isoforms
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def series_from_preferred_isoforms(trait, subset=None) -> Series:
sequences = []
names = []
for gene in tqdm(Gene.query.all()):
- 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"