Skip to content

Commit

Permalink
Fix code smell spend_cash
Browse files Browse the repository at this point in the history
  • Loading branch information
Miranda Fleury committed Mar 19, 2024
1 parent c326e23 commit dc9a73e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,11 @@ class Wallet(object):
def __init__(self, initial_amount=0):
self.balance = initial_amount

def spend_cash(self, amount, deferred=False):
"""Removes the specified amount of money from the current Wallet object"""
if self.balance < amount:
raise InsufficientAmount(f"Not enough available to spend {amount}")

self.balance -= amount

def add_cash(self, amount):
"""Adds the specified amount of money to the current Wallet object"""
self.balance += amount

def spend_money(self, amount, deferred=False):
def spend_money(self, amount):
"""Removes the specified amount of money from the current Wallet object"""
if self.balance < amount:
raise InsufficientAmount(f"Not enough available to spend {amount}")
Expand Down

0 comments on commit dc9a73e

Please sign in to comment.