Skip to content

Commit

Permalink
Maintain compatibility with network v0.5.0a5
Browse files Browse the repository at this point in the history
  • Loading branch information
p-snft committed Dec 16, 2023
1 parent 213b164 commit 523654a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions src/oemof/solph/buses/_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ def __init__(
balanced=True,
custom_properties=None,
):
if inputs is None:
inputs = {}
if outputs is None:
outputs = {}
super().__init__(
label,
inputs=inputs,
Expand Down
12 changes: 6 additions & 6 deletions src/oemof/solph/components/_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ def __init__(
conversion_factors=None,
custom_attributes=None,
):
super().__init__(
label,
inputs=inputs,
outputs=outputs,
custom_properties=custom_attributes,
)
if inputs is None:
warn_if_missing_attribute(self, "inputs")
inputs = {}
Expand All @@ -103,6 +97,12 @@ def __init__(
conversion_factors = {}
if custom_attributes is None:
custom_attributes = {}
super().__init__(
label,
inputs=inputs,
outputs=outputs,
custom_properties=custom_attributes,
)
self.conversion_factors = {
k: sequence(v) for k, v in conversion_factors.items()
}
Expand Down
4 changes: 2 additions & 2 deletions src/oemof/solph/components/experimental/_generic_caes.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def __init__(
):
super().__init__(
label=label,
inputs=None,
outputs=None,
inputs={},
outputs={},
custom_properties=custom_properties,
)

Expand Down

0 comments on commit 523654a

Please sign in to comment.