Showing 95 of 96 total issues
Avoid deeply nested control flow statements. Open
for i in range(len(q)):
if q[i][2] == n2:
break
else:
raise ValueError(
Function merge_all_sections
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def merge_all_sections(
prnt_sctns: T.MutableMapping[str, T.Union[None, str]],
child_sctns: T.MutableMapping[str, T.Union[None, str]],
style: str,
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 __init__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
verbose: int = 0,
sec_div: str = "-",
header: T.Union[str, bool, None] = None,
- 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 indev
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def indev(
Function xmatch_fields
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def xmatch_fields(
catalog: _TBL_TYPE, *others: _TBL_TYPE, fields: _FIELDS_TYPE
) -> T.Tuple[T.List[T.Any], _INFO_TYPE]:
"""Cross-match catalogs' data field(s) against a source catalog.
- 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 report
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def report(
Function import_from_file
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def import_from_file(
*files: str,
is_relative: bool = True,
verbose_imports: T.Optional[bool] = None,
logger: LogFile = _LOGFILE,
- 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 add_folder_backslash
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_folder_backslash(
Function store_function_input
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def store_function_input(
Function modify_parameter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def modify_parameter(
Function make_indev
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def make_indev(
Function open_to_write
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def open_to_write(
Function indev_attribute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def indev_attribute(
Function printLTX
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def printLTX(
Function register
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def register(
Function load
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def load(
Function function_decorator
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def function_decorator(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function save
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def save(
Function open
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def open(