Skip to content

Commit

Permalink
turn exception into depracatin wanring
Browse files Browse the repository at this point in the history
  • Loading branch information
quaquel committed Dec 15, 2023
1 parent d8b9b08 commit 6149acc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ema_workbench/em_framework/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def __set_name__(self, cls, name):
self.name = name
self.internal_name = "_" + name

@abc.abstractmethod
def get_bound(self, instance):
...


class UpperBound(Bound):
def get_bound(self, instance):
Expand Down
4 changes: 3 additions & 1 deletion ema_workbench/em_framework/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def variable_name(self, name):

def __init__(self, name):
if not name.isidentifier():
raise ValueError(f"'{name}' is not a valid Python identifier.")
DeprecationWarning(
f"'{name}' is not a valid Python identifier. In future versions of the workbench, names must be valid python identifiers"
)
super().__init__(name)


Expand Down

0 comments on commit 6149acc

Please sign in to comment.