File CheckDependencies.py
has 407 lines of code (exceeds 250 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright © 2005-2020 EventGhost Project <http://www.eventghost.net/>
#
Function CheckDependencies
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
def CheckDependencies(buildSetup):
failedDeps = []
for dep in DEPENDENCIES:
dep.buildSetup = buildSetup
- 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 InstallDependency
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def InstallDependency(dep):
if dep.name == "Stackless Python":
return dep.Check()
elif not dep.url and not dep.package:
package = dep.name + ("==" + dep.version if dep.exact else "")
- 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 Check
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def Check(self):
try:
with warnings.catch_warnings():
warnings.simplefilter("ignore")
module = __import__(self.module)
- 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 Check
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def Check(self):
with open(join(self.buildSetup.pyVersionDir, "Manifest.xml")) as f:
manifest = f.read()
match = re.search(
'name="(?P<name>.+\.CRT)"\n'
- 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"