Unexpected keyword argument 'granularity' in method call
1166 def get_earned_usage_per_day(
1167 self, start, end, customer, group_by=[], proration=None
1168 ):
1169 per_customer = self.get_usage(1170 start=start,
1171 end=end,
1172 granularity=USAGE_CALC_GRANULARITY.DAILY,
Description
The function call has passed a keyword argument that doesn't correspond to one of the function's parameter names. This is an error.
Bad practice
def update_count(item, available=True)
if available:
count[item] += 1
update_count("coffee", is_available=True) # Wrong keyword arguemnt used
Recommended:
def update_count(item, available=True)
if available:
count[item] += 1
update_count("coffee", available=False)