From 205049ab6fbad5ce87c8d2d603bae4c81527b955 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 15 Oct 2019 10:53:29 +0100 Subject: [PATCH] remove unused util functions in git_webhooks/gitea.py --- modules/git_webhooks/gitea.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/modules/git_webhooks/gitea.py b/modules/git_webhooks/gitea.py index 321e82ec..730159bb 100644 --- a/modules/git_webhooks/gitea.py +++ b/modules/git_webhooks/gitea.py @@ -101,27 +101,12 @@ class Gitea(object): elif event == "ping": return self.ping(data) - def _iso8601(self, s): - return datetime.datetime.strptime(s, utils.ISO8601_PARSE) - def ping(self, data): return ["Received new webhook"] - def _change_count(self, n, symbol, color): - return utils.irc.color("%s%d" % (symbol, n), color)+utils.irc.bold("") - def _added(self, n): - return self._change_count(n, "+", colors.COLOR_POSITIVE) - def _removed(self, n): - return self._change_count(n, "-", colors.COLOR_NEGATIVE) - def _modified(self, n): - return self._change_count(n, "~", utils.consts.PURPLE) - def _short_hash(self, hash): return hash[:8] - def _flat_unique(self, commits, key): - return set(itertools.chain(*(commit[key] for commit in commits))) - def push(self, full_name, data): outputs = [] branch = data["ref"].rpartition("/")[2]