Skip to content

Commit

Permalink
adhere to line lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
lensum committed Feb 16, 2024
1 parent 13752e7 commit 3e96e47
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/oemof/solph/components/_offset_converter.py
Expand Up @@ -112,15 +112,16 @@ def __init__(
if isinstance(coefficients, tuple):
# TODO: add the correct version in the message
msg = (
"Passing a tuple to the keyword `coefficients` will be deprecated"
" in a later version. Please use a dict to specify the"
" corresponding output flow. The first output flow will be assumed"
" as target by default."
"Passing a tuple to the keyword `coefficients` will be"
" deprecated in a later version. Please use a dict to"
" specify the corresponding output flow. The first output"
" flow will be assumed as target by default."
)
warn(msg, DeprecationWarning)
if len(coefficients) != 2:
raise ValueError(
"Two coefficients or coefficient series have to be given."
"Two coefficients or coefficient series have to be"
" given."
)
self.coefficients.update(
{
Expand All @@ -133,14 +134,16 @@ def __init__(
for k, v in coefficients.items():
if len(v) != 2:
raise ValueError(
"Two coefficients or coefficient series have to be given."
"Two coefficients or coefficient series have to be"
" given."
)
self.coefficients.update(
{k: (sequence(v[0]), sequence(v[1]))}
)
else:
raise TypeError(
"`coefficiencts` needs to be either dict or tuple (deprecated)."
"`coefficiencts` needs to be either dict or tuple"
" (deprecated)."
)

# `OffsetConverter` always needs the `NonConvex` attribute, but the
Expand Down

0 comments on commit 3e96e47

Please sign in to comment.