xyb/baidupcsleecher

View on GitHub

Showing 11 of 23 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

Severity: Major
Found in task/management/commands/runtransfer.py and 2 other locations - About 1 day to fix
task/management/commands/runleecher.py on lines 0..33
task/management/commands/runsamplingdownloader.py on lines 0..33

Similar blocks of code found in 3 locations. Consider refactoring.
Open

Severity: Major
Found in task/management/commands/runsamplingdownloader.py and 2 other locations - About 1 day to fix
task/management/commands/runleecher.py on lines 0..33
task/management/commands/runtransfer.py on lines 0..33

Similar blocks of code found in 3 locations. Consider refactoring.
Open

Severity: Major
Found in task/management/commands/runleecher.py and 2 other locations - About 1 day to fix
task/management/commands/runsamplingdownloader.py on lines 0..33
task/management/commands/runtransfer.py on lines 0..33

Function save_shared has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
Open

def save_shared(
client: BaiduPCSClient,
shared_url: str,
remotedir: str,
password: Optional[str] = None,
Severity: Minor
Found in task/baidupcs.py - About 4 hrs to fix

Function list_files has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

def list_files(
self,
remote_dir: str,
retry: int = 3,
fail_silent: bool = False,
Severity: Minor
Found in task/baidupcs.py - About 1 hr to fix

Function download_file has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def download_file(
self,
remote_path: str,
local_dir: str,
file_size: int,
Severity: Minor
Found in task/baidupcs.py - About 55 mins to fix

Function access_shared has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def access_shared(
client: BaiduPCSClient,
shared_url: str,
password: str,
callback_save_captcha: Optional[Callable] = None,
Severity: Minor
Found in task/baidupcs.py - About 55 mins to fix

Function save_shared has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

def save_shared(
Severity: Major
Found in task/baidupcs.py - About 50 mins to fix

    Function save_shared_link has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def save_shared_link(
    Severity: Minor
    Found in task/baidupcs.py - About 45 mins to fix

      Function access_shared has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def access_shared(
      Severity: Minor
      Found in task/baidupcs.py - About 45 mins to fix

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

        def list_all_sub_paths(
        Severity: Minor
        Found in task/baidupcs.py - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language