videomorph-dev/videomorph

View on GitHub

Showing 23 of 38 total issues

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

def win32_paths(base_paths=VM_PATHS):
    program_files = expandvars("%ProgramFiles%")
    paths = {}
    for key, path in base_paths.items():
        if key == "config":
Severity: Minor
Found in videomorph/converter/vmpath.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

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

    def _finish_file_encoding(self):
        """Finish the file encoding process."""
        if self.task_list.running_task_status != STATUS.stopped:
            self.notify()
            # Close and kill the conversion process
Severity: Minor
Found in videomorph/forms/videomorph.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

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

    def start_encoding(self):
        """Start the encoding process."""
        self._update_ui_when_converter_running()

        self.task_list.position += 1
Severity: Minor
Found in videomorph/forms/videomorph.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