Skip to content

Commit

Permalink
Change LARGE to VehicleSize.LARGE in parking lot solution (donnemarti…
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored and donnemartin committed Apr 9, 2018
1 parent 7e316ce commit f552598
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solutions/object_oriented_design/parking_lot/parking_lot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, license_plate):
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):
Expand All @@ -54,7 +54,7 @@ def __init__(self, license_plate):
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):
Expand Down

0 comments on commit f552598

Please sign in to comment.