Skip to content

Commit

Permalink
refactor: docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Noyan Aziz authored and Muhammad Noyan Aziz committed Nov 27, 2024
1 parent 959a1cf commit 184427c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion commerce_coordinator/apps/commercetools/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def is_first_time_discount_eligible(self, email: str) -> bool:
"""
Check if a user is eligible for a first time discount
Args:
username (str): Username of the user
email (str): Email of the user
Returns (bool): True if the user is eligible for a first time discount
"""
try:
Expand Down
4 changes: 2 additions & 2 deletions commerce_coordinator/apps/commercetools/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ def run_filter(self, email): # pylint: disable=arguments-differ
"""
Execute a filter with the signature specified.
Arguments:
username: Username of the user
email: Email of the user
kwargs: The keyword arguments passed through from the filter
Returns:
first_time_discount_eligible (bool): True if the user is eligible for a first time discount
is_eligible (bool): True if the user is eligible for a first time discount
"""
tag = type(self).__name__

Expand Down
2 changes: 1 addition & 1 deletion commerce_coordinator/apps/lms/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def run_filter(cls, email):
"""
Call the PipelineStep(s) defined for this filter.
Arguments:
username: Username of the user
email: Email of the user
Returns:
is_eligible (bool): True if the user is eligible for a first time discount
"""
Expand Down
2 changes: 1 addition & 1 deletion commerce_coordinator/apps/lms/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class FirstTimeDiscountEligibleView(APIView):
throttle_classes = [UserRateThrottle]

def get(self, request):
"""Return paginated response of user's order history."""
"""Return True if user is eligible for a first time discount."""
email = request.query_params.get('email')

if not email: # pragma: no cover
Expand Down

0 comments on commit 184427c

Please sign in to comment.