janw/tapedrive

View on GitHub

Showing 8 of 14 total issues

File podcast.py has 261 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import logging
from urllib.parse import urlencode, urlparse, urlunparse
 
import requests
from actstream import action
Severity: Minor
Found in podcasts/models/podcast.py - About 2 hrs to fix

    Function __iter__ has a Cognitive Complexity of 23 (exceeds 18 allowed). Consider refactoring.
    Open

    def __iter__(self, **kwargs):
    allowed_domains = kwargs.pop("allowed_domains", [])
    for token in Filter.__iter__(self):
    if token["type"] in ["StartTag", "EmptyTag"] and token["data"]:
    data_alt = None
    Severity: Minor
    Found in podcasts/utils/filters.py - About 1 hr to fix

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

    def create_default_settings(
    Severity: Minor
    Found in podcasts/apps.py - About 45 mins to fix

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

      def update(
      Severity: Minor
      Found in podcasts/models/podcast.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

        if data_alt:
        token["data"][(None, "data-alt")] = data_alt
        yield token
        Severity: Major
        Found in podcasts/utils/filters.py - About 45 mins to fix

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

          def queue_download_task(
          Severity: Minor
          Found in podcasts/models/episode.py - About 35 mins to fix

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

            def __init__(self, verbose_name=None, name=None, min_value=None, max_value=None, **kwargs):
            Severity: Minor
            Found in podcasts/models/__init__.py - About 35 mins to fix

              Avoid too many return statements within this function.
              Open

              return
              Severity: Major
              Found in podcasts/utils/__init__.py - About 30 mins to fix
                Severity
                Category
                Status
                Source
                Language