Showing 95 of 96 total issues
Function open
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def open(
Function merge_section
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def merge_section(
key: str,
prnt_sec: T.Union[str, None],
child_sec: T.Union[str, None],
method: T.Union[Literal["merge"], Literal["replace"]] = "replace",
- 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 random_generator_from_seed
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def random_generator_from_seed(
function: T.Callable = None,
seed_names: T.Union[str, T.Sequence[str]] = ("random", "random_seed"),
generator: T.Callable = np.random.RandomState,
raise_if_not_int: bool = False,
- 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 merge_section
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def merge_section(
key: str,
prnt_sec: T.Union[str, None],
child_sec: T.Union[str, None],
style: str,
- 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 parse_rest_doc
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def parse_rest_doc(doc: T.Union[str, None]) -> T.Dict[str, Section]:
"""Extract the headers, delimiters, and text from reST-formatted docstrings.
Parameters
----------
- 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 update_wrapper
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def update_wrapper(
Function idxDecorator
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def idxDecorator(
function: T.Optional[T.Callable] = None,
*,
as_ind: T.Union[bool, Literal["flatten"]] = False,
_doc_fmt: T.Optional[dict] = None, # ibid
- 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 run_imports
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def run_imports(
*files: str,
is_relative: bool = True,
# standard import files
base: bool = False,
- 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 dump
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def dump(
Function _inRange
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _inRange(
x: np.array, rng: T.Sequence, lbi: bool = True, ubi: bool = False
) -> np.array:
"""`inRange` helper function.
- 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 make_function
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_function(
Function load
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def load(
Function __new__
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __new__(cls: type, name: str, bases: tuple, dct: dict):
"""Set properties for new decorator class.
define an `__init__` method and store original docs
Function write
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def write(
self,
*text: str,
start: str = "",
sep: str = " ",
- 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 parse_numpy_doc
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def parse_numpy_doc(doc):
"""Extract the text from the sections of a numpy-formatted docstring.
Parameters
----------
- 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 online_help
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def online_help(query: T.Union[None, str, T.Any] = None, version=__version__):
"""Search the online documentation for the given query.
Opens the results in the default web browser.
Requires an active internet connection.
- 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 printLTX
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def printLTX(
s: str,
math: T.Union[str, bool] = False,
equation: T.Union[str, bool] = False,
matrix: T.Union[str, bool] = False,
- 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_shortest_path
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def find_shortest_path(self, fromtype, totype):
"""Compute shortest path along graph from one system to another.
Parameters
----------
- 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 printMD
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def printMD(
Function open_to_read
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def open_to_read(