mirror of
https://github.com/donnemartin/system-design-primer.git
synced 2025-12-18 10:58:56 +03:00
Convert all .py files to be valid Python
`raise NotImplementedError('Please replace this line with your code...')` signals to the user where they need to put their code.
This approach enables the codebase to be tested with lint tools like flake8, pyflakes, pylint, etc.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class VehicleSize(Enum):
|
||||
@@ -92,11 +93,11 @@ class Level(object):
|
||||
|
||||
def _find_available_spot(self, vehicle):
|
||||
"""Find an available spot where vehicle can fit, or return None"""
|
||||
# ...
|
||||
pass
|
||||
|
||||
def _park_starting_at_spot(self, spot, vehicle):
|
||||
"""Occupy starting at spot.spot_number to vehicle.spot_size."""
|
||||
# ...
|
||||
pass
|
||||
|
||||
|
||||
class ParkingSpot(object):
|
||||
@@ -117,5 +118,8 @@ class ParkingSpot(object):
|
||||
return False
|
||||
return vehicle.can_fit_in_spot(self)
|
||||
|
||||
def park_vehicle(self, vehicle): # ...
|
||||
def remove_vehicle(self): # ...
|
||||
def park_vehicle(self, vehicle):
|
||||
pass
|
||||
|
||||
def remove_vehicle(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user