antonagestam/collectfast

View on GitHub

Showing 2 of 4 total issues

Cyclomatic complexity is too high in method maybe_copy_file. (6)
Open

def maybe_copy_file(self, args: Task) -> None:
"""Determine if file should be copied or not and handle exceptions."""
path, prefixed_path, source_storage = args
 
# Build up found_files to look identical to how it's created in the

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

def maybe_copy_file(self, args: Task) -> None:
"""Determine if file should be copied or not and handle exceptions."""
path, prefixed_path, source_storage = args
 
# Build up found_files to look identical to how it's created in the
Severity: Minor
Found in collectfast/management/commands/collectstatic.py - About 25 mins to fix
Severity
Category
Status
Source
Language