diff options
author | Benjamin Schubert <contact@benschubert.me> | 2020-05-07 22:06:03 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-05-11 16:27:12 +0000 |
commit | db2039fe2f333bc33342b4168910b7ed0a626bbd (patch) | |
tree | 388347936e06e19b8e93941b38046f456e4ee733 /src/buildstream/_gitsourcebase.py | |
parent | 8797ab18b5fe247fcf1409e1bde4dfe0037149eb (diff) | |
download | buildstream-db2039fe2f333bc33342b4168910b7ed0a626bbd.tar.gz |
lint: Stop using mutable objects for default arguments
Diffstat (limited to 'src/buildstream/_gitsourcebase.py')
-rw-r--r-- | src/buildstream/_gitsourcebase.py | 4 |
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)) |