Showing 7 of 7 total issues

File casdriv.py has 306 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# src/fogd_db/casdriv.py
"""Cassandra-Driver CRUD interface."""
from collections import abc, namedtuple

import cassandra.cluster
Severity: Minor
Found in src/cassy/casdriv.py - About 3 hrs to fix

    Function create_entry has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def create_entry(model, data, prior_syncing=False, keyspace=None, con=None):
    Severity: Minor
    Found in src/cassy/casdriv.py - About 35 mins to fix

      Function list_column_values has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def list_column_values(cluster, session, keyspace, table, column):
      Severity: Minor
      Found in src/cassy/cql.py - About 35 mins to fix

        Function delete_entry has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def delete_entry(model, primary_keys, values, keyspace=None, con=None):
        Severity: Minor
        Found in src/cassy/casdriv.py - About 35 mins to fix

          Function drop_row has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def drop_row(cns, keyspace, table, primary_key, value):
          Severity: Minor
          Found in src/cassy/cql.py - About 35 mins to fix

            Function read_entry has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def read_entry(model, primary_keys, values, keyspace=None, con=None):
            Severity: Minor
            Found in src/cassy/casdriv.py - About 35 mins to fix

              Function _handle_path has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              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,
              Severity: Minor
              Found in src/cassy/model.py - About 35 mins to fix

              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

              Severity
              Category
              Status
              Source
              Language