From a36048346e29a8ed866ff3dd79cabfbb1af3b692 Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 7 May 2018 03:26:01 +0200 Subject: [PATCH] Add missing enum imports (#157) --- .../object_oriented_design/online_chat/online_chat.py | 1 + solutions/system_design/mint/mint_snippets.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/solutions/object_oriented_design/online_chat/online_chat.py b/solutions/object_oriented_design/online_chat/online_chat.py index c9e5a984..7063ca04 100644 --- a/solutions/object_oriented_design/online_chat/online_chat.py +++ b/solutions/object_oriented_design/online_chat/online_chat.py @@ -1,4 +1,5 @@ from abc import ABCMeta +from enum import Enum class UserService(object): diff --git a/solutions/system_design/mint/mint_snippets.py b/solutions/system_design/mint/mint_snippets.py index 3000d5fd..cc5d228b 100644 --- a/solutions/system_design/mint/mint_snippets.py +++ b/solutions/system_design/mint/mint_snippets.py @@ -1,12 +1,16 @@ # -*- coding: utf-8 -*- +from enum import Enum + + class DefaultCategories(Enum): HOUSING = 0 FOOD = 1 GAS = 2 SHOPPING = 3 - ... + # ... + seller_category_map = {} seller_category_map['Exxon'] = DefaultCategories.GAS @@ -44,4 +48,3 @@ class Budget(object): def override_category_budget(self, category, amount): self.categories_to_budget_map[category] = amount -