Showing 6 of 9 total issues
Function compute_intermediate_sequences
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def compute_intermediate_sequences(self):
"""
Given the step in the protocol, computes the intermediate mutated
coding sequences.
- 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
Avoid deeply nested control flow statements. Open
for drxn in ['fw', 're']:
primer_data['part'] = n
primer_data['{0}_cloning_primer'.format(drxn)] =\
str(d['{0}_cloning_primer'.format(drxn)].seq)
master_cloning_primers.append(primer_data)
Avoid deeply nested control flow statements. Open
if k in f:
segment = v
backbone = plasmids['pDZ-{0}-split2'.format(segment)]
Function get_part
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def get_part(self, part_name):
"""
Returns the SeqRecord object whose id is the part_name.
Paramters:
- 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 compute_assembly_steps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def compute_assembly_steps(self):
"""
Computes the mutation assembly steps based on the distance graph.
The algorithm is as such:
- 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 compute_pcr_fragments
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def compute_pcr_fragments(self):
"""
Computes the PCR fragments to assemble, based on the protocol. The
protocol currently specifies the codon positions to be mutated. For
example, if we have:
- 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"