diff --git a/tender/__main__.py b/tender/__main__.py index 0c386f4..9c73063 100755 --- a/tender/__main__.py +++ b/tender/__main__.py @@ -36,7 +36,7 @@ def link(url, name): def nested_dict_to_namespaces(dic): """Code for recursively converting dictionaries of dictionaries - into SimpleNamespaces instead. + into SimpleNamespaces instead. """ def recurse(dic): @@ -90,7 +90,6 @@ def unique(sequence): f"https://raw.githubusercontent.com/pycontribs/meta/master/{config_file}", ] ): - try: if re.match(r"https?://", location): stream = urllib.request.urlopen(location) @@ -113,7 +112,6 @@ def unique(sequence): class Tender: - # pylint: disable=too-many-instance-attributes def __init__(self, cfg: Config): @@ -199,8 +197,10 @@ def do_pulls(self): ) pr_labels = [p.name for p in pull.get_labels()] if len(self.required_labels.intersection(pr_labels)) == 0: - msg += "\n\tShould have at least one label out of {} but found: {}".format( - ", ".join(self.required_labels), ", ".join(pr_labels) + msg += ( + "\n\tShould have at least one label out of {} but found: {}".format( + ", ".join(self.required_labels), ", ".join(pr_labels) + ) ) print(msg) cnt += 1 @@ -209,7 +209,6 @@ def do_pulls(self): pass def do_labels(self): - _logger.info("Auditing repository labels") _logger.debug(self.cfg.labels) existing_labels = [x.name for x in self.repo.get_labels()] @@ -265,9 +264,7 @@ def do_draft(self): ) for pull in self.repo.get_pulls(state="closed"): - if pull.merged: - _logger.debug("Doing %s: %s", pull.number, pull.title) # ignoring commits labels = {x.name for x in pull.labels} @@ -275,7 +272,6 @@ def do_draft(self): continue if pull.merge_commit_sha in commits: - valid_labels = list(self.required_labels.intersection(labels)) if valid_labels: section = self.label_section_map[valid_labels[0]] @@ -419,5 +415,4 @@ def do_labels(ctx): if __name__ == "__main__": - cli() # pylint: disable=no-value-for-parameter