summaryrefslogtreecommitdiff
path: root/src/buildstream/_gitsourcebase.py
diff options
context:
space:
mode:
authorBenjamin Schubert <contact@benschubert.me>2020-05-07 22:06:03 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2020-05-11 16:27:12 +0000
commitdb2039fe2f333bc33342b4168910b7ed0a626bbd (patch)
tree388347936e06e19b8e93941b38046f456e4ee733 /src/buildstream/_gitsourcebase.py
parent8797ab18b5fe247fcf1409e1bde4dfe0037149eb (diff)
downloadbuildstream-db2039fe2f333bc33342b4168910b7ed0a626bbd.tar.gz
lint: Stop using mutable objects for default arguments
Diffstat (limited to 'src/buildstream/_gitsourcebase.py')
-rw-r--r--src/buildstream/_gitsourcebase.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildstream/_gitsourcebase.py b/src/buildstream/_gitsourcebase.py
index 1f74bb972..e3b246677 100644
--- a/src/buildstream/_gitsourcebase.py
+++ b/src/buildstream/_gitsourcebase.py
@@ -70,14 +70,14 @@ def _strip_tag(rev):
# tags (list): Tag configuration; see _GitSourceBase._load_tags
#
class _GitMirror(SourceFetcher):
- def __init__(self, source, path, url, ref, *, primary=False, tags=[]):
+ def __init__(self, source, path, url, ref, *, primary=False, tags=None):
super().__init__()
self.source = source
self.path = path
self.url = url
self.ref = ref
- self.tags = tags
+ self.tags = tags or []
self.primary = primary
self.mirror = os.path.join(source.get_mirror_directory(), utils.url_directory_name(url))