Showing 7 of 7 total issues
File casdriv.py
has 306 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# src/fogd_db/casdriv.py
"""Cassandra-Driver CRUD interface."""
from collections import abc, namedtuple
import cassandra.cluster
Function create_entry
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create_entry(model, data, prior_syncing=False, keyspace=None, con=None):
Function list_column_values
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def list_column_values(cluster, session, keyspace, table, column):
Function delete_entry
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def delete_entry(model, primary_keys, values, keyspace=None, con=None):
Function drop_row
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def drop_row(cns, keyspace, table, primary_key, value):
Function read_entry
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def read_entry(model, primary_keys, values, keyspace=None, con=None):
Function _handle_path
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def _handle_path(path, overwrite=False, backup=True):
if str(path).startswith("~"): # pragma: no cover
# coverage is excluded here, cause this part definetly gets
# executed and tested. I might be overlooking something,
- 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"