From 272ac3f6ece5a39abfa20d1da3dceb48be4685f6 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Thu, 6 Aug 2015 23:20:51 +0200 Subject: [PATCH] Do not use mutable lists in function definitions --- tasklib/task.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasklib/task.py b/tasklib/task.py index ed89653..35fc2b7 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -744,7 +744,7 @@ class Task(TaskResource): return args - def refresh(self, only_fields=[], after_save=False): + def refresh(self, only_fields=None, after_save=False): # Raise error when trying to refresh a task that has not been saved if not self.saved: raise Task.NotSaved("Task needs to be saved to be refreshed") @@ -798,8 +798,8 @@ class TaskFilter(SerializingObject): A set of parameters to filter the task list with. """ - def __init__(self, warrior, filter_params=[]): - self.filter_params = filter_params + def __init__(self, warrior, filter_params=None): + self.filter_params = filter_params or [] super(TaskFilter, self).__init__(warrior) def add_filter(self, filter_str): -- 2.39.5