Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
emma58 committed Nov 10, 2024
1 parent 4b8ec54 commit 9e07057
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyomo/util/config_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pyomo.common.collections import ComponentSet


class ComponentDataList():
class ComponentDataList:
"""ComponentDataList(ctype)
Domain validation class that accepts singleton or iterable arguments and
compiles them into a ComponentSet, verifying that they are all ComponentDatas
Expand All @@ -26,6 +26,7 @@ class ComponentDataList():
------
ValueError if all of the arguments are not of type 'ctype'
"""

def __init__(self, ctype):
self._ctype = ctype

Expand All @@ -46,7 +47,8 @@ def __call__(self, x):
_ctype_name = str(self._ctype)
raise ValueError(
f"Expected {_ctype_name} or iterable of "
f"{_ctype_name}s.\n\tReceived {type(x)}")
f"{_ctype_name}s.\n\tReceived {type(x)}"
)

def domain_name(self):
_ctype_name = str(self._ctype)
Expand Down

0 comments on commit 9e07057

Please sign in to comment.