Showing 53 of 329 total issues
Avoid too many return
statements within this function. Open
Open
return {"M": {n: _convert_value_to_db(v) for n, v in value.iteritems()}}
Avoid too many return
statements within this function. Open
Open
return set(bytes(base64.b64decode(v.encode("utf8"))) for v in value["BS"])
Avoid too many return
statements within this function. Open
Open
return {"NULL": True}
Avoid too many return
statements within this function. Open
Open
return {"L": [_convert_value_to_db(v) for v in value]}
Avoid too many return
statements within this function. Open
Open
return {"SS": [s for s in value]}
Avoid too many return
statements within this function. Open
Open
return set(int(v) for v in value["NS"])
Avoid too many return
statements within this function. Open
Open
return {n: _convert_db_to_value(v) for n, v in value["M"].iteritems()}
Avoid too many return
statements within this function. Open
Open
return {"BS": [base64.b64encode(b).decode("utf8") for b in value]}
Avoid too many return
statements within this function. Open
Open
return {"NS": [str(n) for n in value]}
Avoid too many return
statements within this function. Open
Open
return set(value["SS"])
Avoid too many return
statements within this function. Open
Open
return None
Avoid too many return
statements within this function. Open
Open
return [_convert_db_to_value(v) for v in value["L"]]
Function _table_is_fully_active
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def _table_is_fully_active(table):
if table.global_secondary_indexes is not None:
for gsi in table.global_secondary_indexes:
if gsi.index_status != "ACTIVE":
return 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"