Showing 7 of 7 total issues
Xunitrpt
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Xunitrpt(object):
""" The XUnit Test Report Class.
Which represents an XML file as a test report in XUnit format.
The XSD refers to below document:
https://github.com/apache/maven-surefire/blob/master/maven-surefire-plugin/src/site/resources/xsd/surefire-test-report.xsd
Function __call__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
def __call__(self, *args, **kwargs):
"""
Here it is assumed all URLs are for "GET" request, AKA. Safe and Idempotent operation.
:param func: The method to instrument with cache
:return: Wrapped method with cache
- 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 accumulate_xunit_str
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
def accumulate_xunit_str(self, xunit=None):
""" Update data in given XUnit str to current XUnitReport Object
If supplied with malformed str or None, silently do nothing but return itself.
:param xunit: XUnit in a string
:return: XunitReport Object itself after the accumulation
- 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_recent_artifacts
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_recent_artifacts(cls, token=None, vcs='gh', username=None, project=None, limit=None):
Function imgcat
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def imgcat(width=None, height=None, preserve_aspect_ratio=False, inline=True, img_path=None):
Function get_build_artifacts
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_build_artifacts(cls, token, vcs, username, project, build_num):
Function get_recent_builds
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_recent_builds(cls, token=None, vcs='gh', username=None, project=None, limit=None):