fdev/bc125csv

View on GitHub

Showing 26 of 26 total issues

Avoid too many return statements within this function.
Open

        return "ERR"
Severity: Major
Found in bc125csv/scanner.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return CTCSS_TONES.index(ctcss) + 64
    Severity: Major
    Found in bc125csv/importer.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return self.command_export()
      Severity: Major
      Found in bc125csv/handler.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return "CIN,{0},,00000000,FM,{1},0,0,0".format(index, tq)
        Severity: Major
        Found in bc125csv/scanner.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return self.command_import()
          Severity: Major
          Found in bc125csv/handler.py - About 30 mins to fix

            Function get_device has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def get_device(self):
                    """Find compatible scanner and return usb device.
            
                    If found a tty device will be returned, otherwise the
                    usb device will be returned.
            Severity: Minor
            Found in bc125csv/scanner.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