Showing 93 of 115 total issues
Method run
has 18 arguments (exceeds 4 allowed). Consider refactoring. Open
public static java.lang.Object run(String inStructure, String inStructureFormat, String outImageFormat,
int[] atomsToLabel, String[] atomElements, String[] atomLabels, int[] atomLabelColors, double atomLabelFontSize,
int[][] atomSets, String[][] atomSetElements, int[] atomSetColors,
int[][][] bondSets, String[][][] bondSetElements, int[] bondSetColors,
boolean showAtomNums,
Function copytree_to_existing_destination
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def copytree_to_existing_destination(src, dst):
""" Copy files from :obj:`src` to :obj:`dst`, overwriting existing files with the same paths
and keeping all other existing directories and files
Args:
- 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 apply
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def apply(self, ws, first_row, first_col, last_row, last_col, include_help_comments=False):
""" Apply validation to worksheet
Args:
ws (:obj:`xlsxwriter.Worksheet`): worksheet
- 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 validate_dataclass_type
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def validate_dataclass_type(self, attr_name):
""" Validate the type of an attribute in a dataclass instance
Args:
attr_name (:obj:`str`): the name of the attribute to validate
- 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 15 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, input_title='', input_message='', show_input=True,
Function expand_dict
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def expand_dict(d, separator='.'):
""" Expand a dict, converting string or tuple keys into nested keys
Args:
d (:obj:`dict`): dictionary to expand
- 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 default_mutable_params
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def default_mutable_params(mutable_args):
"""A function or method decorator that handles mutable optional parameters.
Optional parameters with mutable default values like d and l in "def f( d={}, l=[])" have
the awkward behavior that a global mutable data strcture is created when the function (or
- 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 draw_molecule
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def draw_molecule(structure, format, image_format='svg', atom_labels=None, atom_label_font_size=0.4,
Function validate_random_state
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def validate_random_state(random_state):
""" Validates a random state
Args:
random_state (:obj:`obj`): random state
- 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 difference
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def difference(self, other):
""" Get difference with another workbook
Args:
other (:obj:`Workbook`): other workbook
- 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 flatten_dict
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def flatten_dict(d, root_flat_key=None):
""" Flatten a dict, converting nested keys into tuples
Args:
d (:obj:`dict`): dictionary to flatten
- 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 write
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def write(path, workbook,
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, path=None, namespace=None, package=None, hash=None,
Function __init__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, sources, config):
"""
Args:
sources (:obj:`list` of :obj:`str`): list of sources of configuration values
config (:obj:`configobj.ConfigObj`): configuration
- 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 write_cell
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def write_cell(self, xls_worksheet, sheet_name, i_row, i_col, value, format):
""" Write a value to a cell
Args:
xls_worksheet (:obj:`xlsxwriter.Worksheet`): Excel worksheet
- 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 draw_molecule
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def draw_molecule(structure, format, image_format='svg', atom_labels=None, atom_label_font_size=0.4,
atom_sets=None, bond_sets=None,
show_atom_nums=False, width=200, height=200, include_xml_header=True):
""" Draw an image of a molecule
- 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 partition_nth
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def partition_nth(s, sep, n):
""" Partition a string on the nth occurrence of a substring
Args:
s (:obj:`str`): string to partition
- 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 rpartition_nth
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def rpartition_nth(s, sep, n):
""" Partition a string on the nth-last occurrence of a substring
Args:
s (:obj:`str`): string to partition
- 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 __str__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __str__(self):
""" Return string representation of this `DebugLogsManager`'s logs
Returns:
:obj:`str`: the name, level, template and filename (if used) for each log
- 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 get_format
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_format(i_row, i_col, style=style,