edgewall/trac

View on GitHub

Showing 1,048 of 1,370 total issues

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

        def add_directory(self, path, dir_baton, copyfrom_path, copyfrom_rev,
Severity: Minor
Found in tracopt/versioncontrol/svn/svn_fs.py - About 35 mins to fix

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

        def diff_tree(self, tree1, tree2, path='', find_renames=False):
    Severity: Minor
    Found in tracopt/versioncontrol/git/PyGIT.py - About 35 mins to fix

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

          def get_changes(self, old_path, old_rev, new_path, new_rev,
      Severity: Minor
      Found in tracopt/versioncontrol/svn/svn_fs.py - About 35 mins to fix

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

            def __init__(self, repo, log, weak=True, git_bin='git',
        Severity: Minor
        Found in tracopt/versioncontrol/git/PyGIT.py - About 35 mins to fix

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

                      def blame_receiver(line_no, revision, author, date, line, pool):
          Severity: Minor
          Found in tracopt/versioncontrol/svn/svn_fs.py - About 35 mins to fix

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

                def get_changes(self, old_path, old_rev, new_path, new_rev,
            Severity: Minor
            Found in tracopt/versioncontrol/git/git_fs.py - About 35 mins to fix

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

              def check_html(filename, html_lines, html_hints, quiet, show_ignored):
              Severity: Minor
              Found in contrib/jinjachecker.py - About 35 mins to fix

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

                        def __init__(self, youngest_rev, oldest_rev, rev_dict, refs_dict,
                Severity: Minor
                Found in tracopt/versioncontrol/git/PyGIT.py - About 35 mins to fix

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

                      def __init__(self, path, rev, repos, pool=None, parent_root=None):
                  Severity: Minor
                  Found in tracopt/versioncontrol/svn/svn_fs.py - About 35 mins to fix

                    Function get_repository has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def get_repository(self, reponame):
                            """Retrieve the appropriate `Repository` for the given
                            repository name.
                    
                            :param reponame: the key for specifying the repository.
                    Severity: Minor
                    Found in trac/versioncontrol/api.py - About 35 mins 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

                    Function create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def create(self, options=[], default_data=True):
                            """Create the basic directory structure of the environment,
                            initialize the database and populate the configuration file
                            with default values.
                    
                    
                    Severity: Minor
                    Found in trac/env.py - About 35 mins 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

                    Function is_component_enabled has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def is_component_enabled(self, cls):
                            """Implemented to only allow activation of components that are
                            not disabled in the configuration.
                    
                            This is called by the `ComponentManager` base class when a
                    Severity: Minor
                    Found in trac/env.py - About 35 mins 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

                    Function save_metadata has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def save_metadata(self, metadata):
                            """Save the repository metadata."""
                            with self.env.db_transaction as db:
                                invalidate = False
                    
                    
                    Severity: Minor
                    Found in trac/versioncontrol/cache.py - About 35 mins 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

                    Function _mimeview_processor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def _mimeview_processor(self, text):
                            annotations = []
                            context = self.formatter.context.child()
                            args = self.args.copy() if self.args else self.args
                            if args and 'lineno' in args:
                    Severity: Minor
                    Found in trac/wiki/formatter.py - About 35 mins 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

                    Function pretty_timedelta has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def pretty_timedelta(time1, time2=None, resolution=None):
                        """Calculate time delta between two `datetime` objects.
                        (the result is somewhat imprecise, only use for prettyprinting).
                    
                        If either `time1` or `time2` is None, the current time will be used
                    Severity: Minor
                    Found in trac/util/datefmt.py - About 35 mins 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

                    Function get_period_names_jquery_ui has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    def get_period_names_jquery_ui(req):
                        # allow to use always English am/pm markers
                        english_names = {'am': 'AM', 'pm': 'PM'}
                        locale = req.lc_time
                        if locale == 'iso8601':
                    Severity: Minor
                    Found in trac/util/datefmt.py - About 35 mins 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

                    Function process_request has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def process_request(self, req):
                            link = req.args.get('link', '')
                            parts = link.split(':', 1)
                            if len(parts) > 1:
                                resolver, target = parts
                    Severity: Minor
                    Found in trac/wiki/intertrac.py - About 35 mins 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

                    Function get_timeline_filters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def get_timeline_filters(self, req):
                            if 'CHANGESET_VIEW' in req.perm:
                                # Non-'hidden' repositories will be listed as additional
                                # repository filters, unless there is only a single repository.
                                filters = []
                    Severity: Minor
                    Found in trac/versioncontrol/web_ui/changeset.py - About 35 mins 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

                    Function _resolve_relative_name has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def _resolve_relative_name(self, pagename, referrer):
                            base = referrer.split('/')
                            components = pagename.split('/')
                            for i, comp in enumerate(components):
                                if comp == '..':
                    Severity: Minor
                    Found in trac/wiki/api.py - About 35 mins 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

                    Function close_tag has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        def close_tag(self, open_tag, close_tag=None):
                            """Open a inline style tag.
                    
                            If `close_tag` is not specified, it's an indirect tag (0.12)
                            """
                    Severity: Minor
                    Found in trac/wiki/formatter.py - About 35 mins 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

                    Severity
                    Category
                    Status
                    Source
                    Language