Showing 93 of 115 total issues
Function rfind_nth
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def rfind_nth(s, sub, n, start=0, end=float('inf')):
""" Get the index of the nth-last occurrence of a substring within a string
Args:
s (:obj:`str`): string to 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 difference
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def difference(self, other):
""" Get difference with another worksheet
Args:
other (:obj:`Worksheet`): other 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 read_cell
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def read_cell(self, sheet_name, xls_worksheet, i_row, i_col):
""" Read the value of a cell
Args:
sheet_name (:obj:`str`): worksheet name
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
def difference(self, other):
""" Get difference with another row
Args:
other (:obj:`Row`): other row
- 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_worksheet
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def write_worksheet(self, sheet_name, data, style=None, validation=None, protected=False):
""" Write worksheet to file
Args:
sheet_name (:obj:`str`): sheet name
- 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 cast_to_builtins
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def cast_to_builtins(obj):
""" Recursively type cast an object to a semantically equivalent object expressed using only builtin types
* All iterable objects (objects with `__iter__` attribute) are converted to lists
* All dictionable objects (objects which are dictionaries or which have the `__dict__` attribute) are
- 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 find_nth
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def find_nth(s, sub, n, start=0, end=float('inf')):
""" Get the index of the nth occurrence of a substring within a string
Args:
s (:obj:`str`): string to 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 isclass_by_name
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def isclass_by_name(cls_name, cls_info):
"""Compares a class name with the names of the classes in `cls_info`.
Args:
cls_name (:obj:`str`): class name
- 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 9 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, value=''):
"""
Args:
value (:obj:`dict` or :obj:`str`): dictionary or string representation of the formula
- 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 __eq__
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def __eq__(self, other):
""" Compare rows
Args:
other (:obj:`Row`): other row
- 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_major_micro_species
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_major_micro_species(structure_or_structures, in_format, out_format,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, path, title=None, description=None, keywords=None, version=None, language=None, creator=None):
Method run_multiple
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public static String[] run_multiple(String[] inStructures, String inStructureFormat, String outStructureFormat,
Float ph, boolean majorTautomer, boolean keepExplicitHydrogens, boolean dearomatize) throws IOException, PluginException {
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, path, title=None, description=None, keywords=None, version=None, language=None,
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, path, title=None, description=None, keywords=None, version=None, language=None, creator=None):
Method run_one
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public static String run_one(String inStructure, String inStructureFormat, String outStructureFormat,
Float ph, boolean majorTautomer, boolean keepExplicitHydrogens, boolean dearomatize) throws IOException, PluginException {
Function apply
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def apply(self, ws, first_row, first_col, last_row, last_col, include_help_comments=False):
Avoid deeply nested control flow statements. Open
if i2 in used2:
continue
try:
Function write_cell
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def write_cell(self, xls_worksheet, sheet_name, i_row, i_col, value, format):
Function get_package_root
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_package_root(file_in_package):
""" Obtain root directory of a package by following `__init__.py` files up the file hierarchy
Args:
file_in_package (:obj:`str`): pathname of a file in a package
- 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"