Skip to content

Commit

Permalink
Use decorators with decorator syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmiller committed Nov 20, 2018
1 parent 4ccc433 commit 3a05941
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
11 changes: 3 additions & 8 deletions intrahospital_api/services/appointments/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ def load_patients():
return updated


# not an invalid, name, its not a constant, seperate out
# for testing purposes
# pylint: disable=invalid-name
batch_load = load_utils.batch_load(
service_name="appointments"
)(
load_patients
)
@load_utils.batch_load('appointments')
def batch_load():
return load_patients()
12 changes: 4 additions & 8 deletions intrahospital_api/services/demographics/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,7 @@ def for_hospital_number(hospital_number):

return result

# not an invalid, name, its not a constant, seperate out
# for testing purposes
# pylint: disable=invalid-name
batch_load = load_utils.batch_load(
service_name="demographics"
)(
load_patients
)

@load_utils.batch_load('demographics')
def batch_load():
return load_patients()

0 comments on commit 3a05941

Please sign in to comment.