divio/django-cms

View on GitHub

Showing 869 of 869 total issues

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

(function ($) {
    "use strict";
    $.fn.select2.locales['zh-CN'] = {
        formatNoMatches: function () { return "没有找到匹配项"; },
        formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";},
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_zh-CN.js and 10 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 216.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['ka'] = {
        formatNoMatches: function () { return "ვერ მოიძებნა"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_ka.js and 10 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 216.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['ms'] = {
        formatNoMatches: function () { return "Tiada padanan yang ditemui"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_ms.js and 10 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 216.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['hu'] = {
        formatNoMatches: function () { return "Nincs találat."; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_hu.js and 10 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 216.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['he'] = {
        formatNoMatches: function () { return "לא נמצאו התאמות"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_he.js and 10 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 216.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";
    $.fn.select2.locales['ug-CN'] = {
        formatNoMatches: function () { return "ماس كېلىدىغان ئۇچۇر تېپىلمىدى"; },
        formatInputTooShort: function (input, min) { var n = min - input.length; return "يەنە " + n + " ھەرپ كىرگۈزۈڭ";},
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_ug-CN.js and 10 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 216.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";
    $.fn.select2.locales['zh-TW'] = {
        formatNoMatches: function () { return "沒有找到相符的項目"; },
        formatInputTooShort: function (input, min) { var n = min - input.length; return "請再輸入" + n + "個字元";},
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_zh-TW.js and 10 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 216.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";
    $.fn.select2.locales['fi'] = {
        formatNoMatches: function () {
            return "Ei tuloksia";
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_fi.js and 10 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
cms/static/cms/js/select2/select2_locale_th.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 216.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

(function ($) {
    "use strict";

    $.fn.select2.locales['th'] = {
        formatNoMatches: function () { return "ไม่พบข้อมูล"; },
Severity: Major
Found in cms/static/cms/js/select2/select2_locale_th.js and 10 other locations - About 1 day to fix
cms/static/cms/js/select2/select2_locale_fi.js on lines 4..30
cms/static/cms/js/select2/select2_locale_he.js on lines 6..19
cms/static/cms/js/select2/select2_locale_hu.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ja.js on lines 4..17
cms/static/cms/js/select2/select2_locale_ka.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ko.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ms.js on lines 6..19
cms/static/cms/js/select2/select2_locale_ug-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-CN.js on lines 4..16
cms/static/cms/js/select2/select2_locale_zh-TW.js on lines 4..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 216.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File testcases.py has 543 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import json
import sys
import warnings
from urllib.parse import unquote, urljoin

Severity: Major
Found in cms/test_utils/testcases.py - About 1 day to fix

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    Severity: Major
    Found in cms/test_utils/project/urls_2.py and 1 other location - About 1 day to fix
    cms/test_utils/project/urls_3.py on lines 0..29

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 129.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

    Severity: Major
    Found in cms/test_utils/project/urls_3.py and 1 other location - About 1 day to fix
    cms/test_utils/project/urls_2.py on lines 0..29

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 129.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    BasePageAdmin has 59 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class BasePageAdmin(PlaceholderAdminMixin, admin.ModelAdmin):
        form = AddPageForm
        ordering = ('node__path',)
        search_fields = ('=id', 'title_set__slug', 'title_set__title', 'reverse_id')
        add_general_fields = ['title', 'slug', 'language', 'template']
    Severity: Major
    Found in cms/admin/pageadmin.py - About 1 day to fix

      Function details has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
      Open

      def details(request, slug):
          """
          The main view of the Django-CMS! Takes a request and a slug, renders the
          page.
          """
      Severity: Minor
      Found in cms/views.py - About 1 day 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

      File plugin_rendering.py has 495 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import contextlib
      from collections import OrderedDict
      from functools import partial
      
      from classytags.utils import flatten_context
      Severity: Minor
      Found in cms/plugin_rendering.py - About 7 hrs to fix

        File cms.toolbar.js has 493 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*
         * Copyright https://github.com/divio/django-cms
         */
        
        import $ from 'jquery';
        Severity: Minor
        Found in cms/static/cms/js/modules/cms.toolbar.js - About 7 hrs to fix

          Function _events has 194 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _events: function _events() {
                  var that = this;
                  var LONG_MENUS_THROTTLE = 10;
          
                  // attach event to the navigation elements
          Severity: Major
          Found in cms/static/cms/js/modules/cms.toolbar.js - About 7 hrs to fix

            Function _mouseDrag has 189 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _mouseDrag: function(event) {
                        var i, item, itemElement, intersection,
                            o = this.options,
                            scrolled = false;
            
            
            Severity: Major
            Found in cms/static/cms/js/modules/jquery.ui.nestedsortable.js - About 7 hrs to fix

              Function modify has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
              Open

                  def modify(self, request, nodes, namespace, root_id, post_cut, breadcrumb):
                      if post_cut or breadcrumb:
                          return nodes
                      selected = None
                      root_nodes = []
              Severity: Minor
              Found in menus/modifiers.py - About 7 hrs 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

              BaseCMSTestCase has 51 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class BaseCMSTestCase:
                  counter = 1
              
                  def _fixture_setup(self):
                      super()._fixture_setup()
              Severity: Major
              Found in cms/test_utils/testcases.py - About 7 hrs to fix
                Severity
                Category
                Status
                Source
                Language