MCPcopy Index your code
hub / github.com/ndleah/python-mini-project / add_expense

Method add_expense

Finance_Tracker/main.py:120–128  ·  view source on GitHub ↗
(self, category_entry, amount_entry)

Source from the content-addressed store, hash-verified

118 amount_entry.delete(0, 'end')
119
120 def add_expense(self, category_entry, amount_entry):
121 amount = self.get_amount_from_entry(amount_entry)
122 category = category_entry.get()
123 if amount is not None:
124 self.expense += amount
125 self.expense_transactions.append((category, amount))
126 self.update_table(self.expense_tree, self.expense_transactions)
127 category_entry.delete(0, 'end')
128 amount_entry.delete(0, 'end')
129
130 def get_amount_from_entry(self, entry):
131 try:

Callers

nothing calls this directly

Calls 2

get_amount_from_entryMethod · 0.95
update_tableMethod · 0.95

Tested by

no test coverage detected