From 1b339dbddeb1b3ec80d8d20a7f18f34cb268d15a Mon Sep 17 00:00:00 2001 From: cclauss Date: Mon, 9 Apr 2018 02:25:11 +0200 Subject: [PATCH] Change LARGE to VehicleSize.LARGE in parking lot solution (#146) --- solutions/object_oriented_design/parking_lot/parking_lot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solutions/object_oriented_design/parking_lot/parking_lot.py b/solutions/object_oriented_design/parking_lot/parking_lot.py index 9167d9fd..12fcd245 100644 --- a/solutions/object_oriented_design/parking_lot/parking_lot.py +++ b/solutions/object_oriented_design/parking_lot/parking_lot.py @@ -45,7 +45,7 @@ class Car(Vehicle): super(Car, self).__init__(VehicleSize.COMPACT, license_plate, spot_size=1) def can_fit_in_spot(self, spot): - return True if (spot.size == LARGE or spot.size == COMPACT) else False + return spot.size in (VehicleSize.LARGE, VehicleSize.COMPACT) class Bus(Vehicle): @@ -54,7 +54,7 @@ class Bus(Vehicle): super(Bus, self).__init__(VehicleSize.LARGE, license_plate, spot_size=5) def can_fit_in_spot(self, spot): - return True if spot.size == LARGE else False + return spot.size == VehicleSize.LARGE class ParkingLot(object):