Skip to content

Commit

Permalink
Merge pull request #125 from RAMP-project/review_Appliance_deprecate
Browse files Browse the repository at this point in the history
Adding depreciation warning to Appliance method in User class
  • Loading branch information
Bachibouzouk authored Apr 10, 2024
2 parents a396c82 + 6cbad67 commit 479c854
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ramp/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def single_appliance_daily_load_profile(args):

return args[0], app.daily_use

warnings.simplefilter('always', DeprecationWarning)

class UseCase:
def __init__(
Expand Down Expand Up @@ -845,6 +846,9 @@ def Appliance(
------
refer to Appliance class docs
"""

warnings.warn("This function is deprecated and not supported since version v0.4.0. Instead use the add_appliance method.", DeprecationWarning)

return self.add_appliance(
number=number,
power=power,
Expand Down

0 comments on commit 479c854

Please sign in to comment.