jacquev6/LowVoltage

View on GitHub

Showing 53 of 329 total issues

Avoid too many return statements within this function.
Open

        return {"M": {n: _convert_value_to_db(v) for n, v in value.iteritems()}}
Severity: Major
Found in LowVoltage/actions/conversion.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return set(bytes(base64.b64decode(v.encode("utf8"))) for v in value["BS"])
    Severity: Major
    Found in LowVoltage/actions/conversion.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return {"NULL": True}
      Severity: Major
      Found in LowVoltage/actions/conversion.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return {"L": [_convert_value_to_db(v) for v in value]}
        Severity: Major
        Found in LowVoltage/actions/conversion.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return {"SS": [s for s in value]}
          Severity: Major
          Found in LowVoltage/actions/conversion.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return set(int(v) for v in value["NS"])
            Severity: Major
            Found in LowVoltage/actions/conversion.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return {n: _convert_db_to_value(v) for n, v in value["M"].iteritems()}
              Severity: Major
              Found in LowVoltage/actions/conversion.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return {"BS": [base64.b64encode(b).decode("utf8") for b in value]}
                Severity: Major
                Found in LowVoltage/actions/conversion.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return {"NS": [str(n) for n in value]}
                  Severity: Major
                  Found in LowVoltage/actions/conversion.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return set(value["SS"])
                    Severity: Major
                    Found in LowVoltage/actions/conversion.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return None
                      Severity: Major
                      Found in LowVoltage/actions/conversion.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return [_convert_db_to_value(v) for v in value["L"]]
                        Severity: Major
                        Found in LowVoltage/actions/conversion.py - About 30 mins to fix

                          Function _table_is_fully_active has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          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
                          Severity: Minor
                          Found in LowVoltage/compounds/wait_for_table_activation.py - About 25 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