Showing 1,050 of 1,372 total issues
Function diff_tree
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def diff_tree(self, tree1, tree2, path='', find_renames=False):
Function get_changes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_changes(self, old_path, old_rev, new_path, new_rev,
Function get_changes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_changes(self, old_path, old_rev, new_path, new_rev,
Function blame_receiver
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def blame_receiver(line_no, revision, author, date, line, pool):
Function add_file
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_file(self, path, dir_baton, copyfrom_path, copyfrom_revision,
Function check_html
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def check_html(filename, html_lines, html_hints, quiet, show_ignored):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, repo, log, weak=True, git_bin='git',
Function add_directory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def add_directory(self, path, dir_baton, copyfrom_path, copyfrom_rev,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, youngest_rev, oldest_rev, rev_dict, refs_dict,
Function _make_link
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _make_link(self, ns, target, match, label, fullmatch):
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
- Read upRead up
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.
- Read upRead up
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_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.
- Read upRead up
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
- Read upRead up
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)
"""
- Read upRead up
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 = []
- Read upRead up
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
- Read upRead up
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 == '..':
- Read upRead up
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:
- Read upRead up
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 render_property_diff
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def render_property_diff(self, name, old_node, old_props,
new_node, new_props, options):
"""Renders diffs of a node property to HTML."""
if name in BrowserModule(self.env).hidden_properties:
return
- Read upRead up
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"