Skip to content

Commit

Permalink
Add missing colons to method code example
Browse files Browse the repository at this point in the history
  • Loading branch information
jdanford committed Jan 25, 2024
1 parent b453aa5 commit 7140ef5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,18 @@ Class and object methods can also be cached. Cachier will automatically ignore t
# Instance method does not depend on object's internal state, so good to cache
@cachier()
def good_usage_1(self, arg_1, arg_2)
def good_usage_1(self, arg_1, arg_2):
return arg_1 + arg_2
# Instance method is calling external service, probably okay to cache
@cachier()
def good_usage_2(self, arg_1, arg_2)
def good_usage_2(self, arg_1, arg_2):
result = self.call_api(arg_1, arg_2)
return result
# Instance method relies on object attribute, NOT good to cache
@cachier()
def bad_usage(self, arg_1, arg_2)
def bad_usage(self, arg_1, arg_2):
return arg_1 + arg_2 + self.arg_3
Expand Down

0 comments on commit 7140ef5

Please sign in to comment.