Skip to content

Commit

Permalink
Make all **kwargs consistent with small k
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaOndieki committed Jun 27, 2018
1 parent cd24998 commit ed90dbd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions ridemyway/controllers/ride_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class RideController():
Controls all CRUD operations of the Ride object.
"""

def create_ride(self, **Kwargs):
def create_ride(self, **kwargs):
"""
Creates and adds a ride to the app database.
Expand All @@ -27,13 +27,13 @@ def create_ride(self, **Kwargs):
date_offered = datetime.now().strftime('%b %d %Y %H:%M%p')
self.new_ride = Ride(
ride_id=ride_id,
departure=Kwargs['departure'],
origin=Kwargs['origin'],
destination=Kwargs['destination'],
departure=kwargs['departure'],
origin=kwargs['origin'],
destination=kwargs['destination'],
vehicle_number_plate=
Kwargs['vehicle_number_plate'],
capacity=Kwargs['capacity'],
cost=Kwargs['cost'],
kwargs['vehicle_number_plate'],
capacity=kwargs['capacity'],
cost=kwargs['cost'],
date_offered=date_offered,
availability='available')
ride = self.new_ride.__dict__
Expand Down
6 changes: 3 additions & 3 deletions ridemyway/controllers/ride_request_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class RequestController():
Controls all CRUD operations of the Request object.
"""

def create_request(self, **Kwargs):
def create_request(self, **kwargs):
"""
Creates and adds a request to the app database.
Expand All @@ -18,15 +18,15 @@ def create_request(self, **Kwargs):
failed status otherwise.
"""
try:
app.database['Rides'][Kwargs['ride_id']]
app.database['Rides'][kwargs['ride_id']]
request_ids = [x for x in app.database['Requests']]
if request_ids:
request_id = max(request_ids) + 1
else:
request_id = 1
self.new_request = Request(
request_id=request_id,
ride_id=Kwargs['ride_id'],
ride_id=kwargs['ride_id'],
status='available'
)
request = self.new_request.__dict__
Expand Down
2 changes: 1 addition & 1 deletion ridemyway/models/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Request():
"""
Creates Request objects.
**Kwargs:
**kwargs:
ride_id: A unique identifier of the ride the request is
being made to.
request_id: A unique identifier for the request.
Expand Down
2 changes: 1 addition & 1 deletion ridemyway/models/ride.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Ride():
"""
Creates Ride objects.
**Kwargs:
**kwargs:
ride_id: A unique identifier for the ride.
departure: Date and time the ride is to take place.
origin: Place where the ride starts.
Expand Down

0 comments on commit ed90dbd

Please sign in to comment.