diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2019-06-06 17:40:40 +0100 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-06-18 09:45:00 +0000 |
commit | f1f6a5a6e09e275566bf56f4728826844b38dd47 (patch) | |
tree | e5828b612bbf8f1d3544099ea66181672dcde5cf /src/buildstream | |
parent | a65b589b8577291185482cca51733f603a83ef1b (diff) | |
download | buildstream-f1f6a5a6e09e275566bf56f4728826844b38dd47.tar.gz |
_gitsourcebase: ignore or fix arguments-differ err
PyLint helpfully points out that _GitMirror.fetch() does not match
SourceFetcher.fetch() - it is missing the *kwargs argument. The same for
_GitSourceBase.track().
Move towards being able to enable the 'arguments-differ' error faster
by side-stepping the class design debate and ignoring the error for now.
Change _GitSourceBase.set_ref() argument names to match
Source.set_ref().
Diffstat (limited to 'src/buildstream')
-rw-r--r-- | src/buildstream/_gitsourcebase.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buildstream/_gitsourcebase.py b/src/buildstream/_gitsourcebase.py index 7f02af40d..1f539d820 100644 --- a/src/buildstream/_gitsourcebase.py +++ b/src/buildstream/_gitsourcebase.py @@ -118,7 +118,7 @@ class _GitMirror(SourceFetcher): fail_temporarily=True, cwd=self.mirror) - def fetch(self, alias_override=None): + def fetch(self, alias_override=None): # pylint: disable=arguments-differ # Resolve the URL for the message resolved_url = self.source.translate_url(self.url, alias_override=alias_override, @@ -470,8 +470,8 @@ class _GitSourceBase(Source): def get_ref(self): return self.mirror.ref, self.mirror.tags - def set_ref(self, ref_data, node): - if not ref_data: + def set_ref(self, ref, node): + if not ref: self.mirror.ref = None if 'ref' in node: del node['ref'] @@ -479,8 +479,8 @@ class _GitSourceBase(Source): if 'tags' in node: del node['tags'] else: - ref, tags = ref_data - node['ref'] = self.mirror.ref = ref + actual_ref, tags = ref + node['ref'] = self.mirror.ref = actual_ref self.mirror.tags = tags if tags: node['tags'] = [] @@ -493,7 +493,7 @@ class _GitSourceBase(Source): if 'tags' in node: del node['tags'] - def track(self): + def track(self): # pylint: disable=arguments-differ # If self.tracking is not specified it's not an error, just silently return if not self.tracking: |