Showing 8 of 8 total issues
Function define_logging
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def define_logging(
Function define_logging
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
def define_logging(
logpath=None,
logfile="oemof.log",
file_format=None,
screen_format=None,
Function exec_in_env
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def exec_in_env():
env_path = join(base_path, ".tox", "bootstrap")
if sys.platform == "win32":
bin_path = join(env_path, "Scripts")
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 define_logging
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def define_logging(
logpath=None,
logfile="oemof.log",
file_format=None,
screen_format=None,
- 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
Consider simplifying this complex logical expression. Open
if (
(n < 1)
or (wacc < 0 or wacc > 1)
or (u < 1)
or (cost_decrease < 0 or cost_decrease > 1)
Function annuity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def annuity(capex, n, wacc, u=None, cost_decrease=0):
Function annuity
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def annuity(capex, n, wacc, u=None, cost_decrease=0):
r"""Calculates the annuity of an initial investment 'capex', considering
the cost of capital 'wacc' during a project horizon 'n'
In case of a single initial investment, the employed formula reads:
- 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 main
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def main():
import jinja2
import matrix
print("Project path: {0}".format(base_path))
- 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"