Showing 139 of 397 total issues
Function __init__
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _evaluate_remaining_value_difference
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def _evaluate_remaining_value_difference(
Avoid deeply nested control flow statements. Open
for t in self.TIMESTEPS:
self.flow[o, i, t].setlb(
self.flows[o, i].min[t]
* self.flows[o, i].nominal_value
)
Function storage_level_constraint
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def storage_level_constraint(
Avoid deeply nested control flow statements. Open
for t in self.TIMESTEPS:
self.flow[o, i, t].setlb(0)
else:
Function filter_nodes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def filter_nodes(results, option=NodeOption.All, exclude_busses=False):
"""Get set of nodes from results-dict for given node option.
This function filters nodes from results for special needs. At the moment,
the following options are available:
- 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 8 (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 constraint_group
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def constraint_group(self):
possible_approaches = ["DIW", "DLR", "oemof"]
if not self.shed_eligibility and not self.shift_eligibility:
raise ValueError(
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function _extract_multi_period_model_result
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _extract_multi_period_model_result(
model,
df_dict,
period_indexed=None,
result=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 _extract_multi_period_model_result
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _extract_multi_period_model_result(
Function equate_flows_by_keyword
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def equate_flows_by_keyword(
Function equate_variables
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def equate_variables(model, var1, var2, factor1=1, name=None):
Function limit_active_flow_count
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def limit_active_flow_count(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function equate_flows
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def equate_flows(model, flows1, flows2, factor1=1, name="equate_flows"):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(