LARGE —> VehicleSize.LARGE

The class name is required in this context.
pull/146/head
cclauss 2018-03-10 03:36:57 +01:00 committed by GitHub
parent 38a93dc190
commit 9ed18114fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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 bool(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 bool(spot.size == VehicleSize.LARGE)
class ParkingLot(object):