From 102aa587e359f8600566000b09ffe3eef84647db Mon Sep 17 00:00:00 2001 From: Miroslav Suchý Date: Sep 03 2018 09:19:22 +0000 Subject: W0102, dangerous-default-value See https://docs.quantifiedcode.com/python-anti-patterns/correctness/mutable_default_value_as_argument.html#anti-pattern --- diff --git a/dist-git/dist_git/importer.py b/dist-git/dist_git/importer.py index 524ec8f..e3f4234 100644 --- a/dist-git/dist_git/importer.py +++ b/dist-git/dist_git/importer.py @@ -28,8 +28,10 @@ class Importer(object): self.tmp_root = None - def try_to_obtain_new_tasks(self, exclude=[], limit=1): + def try_to_obtain_new_tasks(self, exclude=None, limit=1): log.debug("Get task data...") + if exclude is None: + exclude = [] try: # get the data r = get(self.get_url)