Showing 7 of 7 total issues
Function json_decoder_hook
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def json_decoder_hook(dct, str_decoders=STRING_DECODERS,
converters=MappingProxyType(dict())) -> dict:
"""Decoder for parsing typical objects like uuid's and dates."""
for k, v in dct.items():
- 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 from_zipfile
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def from_zipfile(cls, path, filename, encoding, dialect, fields,
Function from_file
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def from_file(cls, path, encoding, dialect, fields, converters, field_index):
Function from_zipfile
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def from_zipfile(cls, path, filename, encoding, dialect, fields, converters):
Function from_file
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def from_file(cls, path, encoding, dialect, fields, converters):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, stream, dialect: csv.Dialect, fields: list,
Function ftp_walk
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def ftp_walk(ftpconn: FTP, rootpath=''):
"""Recursively traverse an ftp directory to discovery directory listing."""
current_directory = rootpath
- 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"