Showing 5 of 35 total issues
Function get_kernel_sources
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def get_kernel_sources(self, kernel_version, debug=True):
"""
Function for download the kernel sources
:return: void
- Read upRead up
- Create a ticketCreate a ticket
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 post
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def post(self):
app = current_app
args = self.reqparse.parse_args()
args["UUID"] = check_uuid(args["UUID"])
parse = reqparse.RequestParser()
- Create a ticketCreate a ticket
Function _command
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _command(bashCommand, kernel_source_dir=None, env=None):
"""
Popen override function
:param bashCommand: List of command arguments to execute
- Read upRead up
- Create a ticketCreate a ticket
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 build_kernel
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def build_kernel(self, jobs):
kernel_config_path = os.path.join(
self.__kernel_source_dir__, ".config"
)
- Read upRead up
- Create a ticketCreate a ticket
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 post
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def post(self):
app = current_app
args = self.reqparse.parse_args()
args["UUID"] = check_uuid(args["UUID"])
parse = reqparse.RequestParser()
- Read upRead up
- Create a ticketCreate a ticket
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"