Khoding / khoBlog

Function with cyclomatic complexity higher than threshold PY-R1000
Anti-pattern
Minor
5 months ago5 months old
display_quotes has a cyclomatic complexity of 20 with "high" risk
 11
 12
 13@register.simple_tag()
 14def display_quotes(model_class, model_slug, show_title=False): 15    """Display quotes"""
 16    content_type = ContentType.objects.get(app_label="Quotes", model=model_class)
 17    lookup_container = content_type.get_object_for_this_type(slug=model_slug)