Showing 140 of 425 total issues
Function draw_graph
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def draw_graph(
Function _evaluate_remaining_value_difference
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def _evaluate_remaining_value_difference(
Function draw_graph
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def draw_graph(
Function __init__
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(
self,
nominal_value=None,
variable_costs=0,
min=None,
Function _create
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _create(self, group=None):
"""
Create constraints for GenericCHPBlock.
Parameters
- 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 __init__
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
label=None,
inputs=None,
outputs=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
Function investment_limit
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def investment_limit(model, limit=None):
r"""Set an absolute limit for the total investment costs of an investment
optimization problem (over all periods in case of a multi-period model):
.. math:: \sum_{investment\_costs} \leq limit
- 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 saturating_storage_example
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def saturating_storage_example():
# create an energy system
idx = pd.date_range("1/1/2023", periods=100, freq="H")
es = solph.EnergySystem(timeindex=idx, infer_last_interval=False)
Function __init__
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def __init__(
self,
label=None,
inputs=None,
outputs=None,
Function optimise_scenario
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def optimise_scenario():
logger.define_logging()
datetime_index = pd.date_range(
"2016-01-01 00:00:00", "2016-01-01 23:00:00", freq="60min"
)
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _evaluate_remaining_value_difference
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def _evaluate_remaining_value_difference(
Function create_dataframe
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def create_dataframe(om):
"""Create a result DataFrame with all optimization data
Results from Pyomo are written into one common pandas.DataFrame where
separate columns are created for the variable index e.g. for tuples
- 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 _create
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _create(self, group=None):
"""
Parameters
----------
group : list
- 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 _evaluate_remaining_value_difference
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _evaluate_remaining_value_difference(
self,
m,
p,
i,
- 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 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 shared_limit
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def shared_limit(
Function _evaluate_remaining_value_difference
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _evaluate_remaining_value_difference(
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(