Showing 1,050 of 1,372 total issues
Avoid too many return
statements within this function. Open
return tag.span(alist[0], *[(', ', a) for a in alist[1:]])
Avoid too many return
statements within this function. Open
return tag(groups[0], [(', ', g) for g in groups[1:]])
Avoid too many return
statements within this function. Open
return tag.div(tag.dl([(tag.dt(ticket_anchor(ticket)),
Avoid too many return
statements within this function. Open
return tag.span(_("No results"), class_='query_no_results')
Avoid too many return
statements within this function. Open
return (('NOT ' if neg else '')
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return tag.div(
Avoid too many return
statements within this function. Open
return tag.div(
Avoid too many return
statements within this function. Open
return None # no match for action, can't decide
Avoid too many return
statements within this function. Open
return 'ticket_preview.html', data
Avoid too many return
statements within this function. Open
return 'ticket.html', data
Avoid too many return
statements within this function. Open
return resolved
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return rc
Function get_resource_url
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_resource_url(self, resource, href, **kwargs):
if resource.realm == self.changeset_realm:
parent = resource.parent
return href.changeset(resource.id, parent and parent.id or None)
elif resource.realm == self.source_realm:
- 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 component_guard
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def component_guard(self, component, reraise=False):
"""Traps any runtime exception raised when working with a component
and logs the error.
:param component: the component responsible for any error that
- 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_by_path
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_repository_by_path(self, path):
"""Retrieve a matching `Repository` for the given `path`.
:param path: the eventually scoped repository-scoped path
:return: a `(reponame, repos, path)` triple, where `path` is
- 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_real_repositories
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_real_repositories(self):
"""Return a sorted list of all real repositories (i.e. excluding
aliases).
"""
repositories = set()
- 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 _normrev
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _normrev(self, rev):
if not rev:
raise NoSuchChangeset(rev)
if self.resolve:
return self.repos.normalize_rev(rev)
- 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"