From 414a05b8e4ee73aaf826e8265e7b4b9d8554d854 Mon Sep 17 00:00:00 2001 From: Christian Cwienk Date: Fri, 6 Dec 2024 16:22:34 +0100 Subject: [PATCH] cleanup: purge dead code --- github/util.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/github/util.py b/github/util.py index 2ed75bb30..b364ffb2f 100644 --- a/github/util.py +++ b/github/util.py @@ -8,7 +8,6 @@ import enum import io import re -import sys import typing from typing import Iterable, Tuple @@ -788,32 +787,6 @@ def branches( return list(map(lambda r: r.name, repo.branches())) -def retrieve_email_addresses( - github_cfg: GithubConfig, - github_users: typing.Sequence[str] | typing.Collection[str], - out_file: str=None -): - github = ccc.github.github_api(github_cfg=github_cfg) - - def retrieve_email(username: str): - user = github.user(username) - return user.email - - fh = open(out_file, 'w') if out_file else sys.stdout - - email_addresses_count = 0 - - for email_address in filter(None, map(retrieve_email, github_users)): - fh.write(email_address + '\n') - email_addresses_count += 1 - - ci.util.verbose('retrieved {sc} email address(es) from {uc} user(s)'.format( - sc=email_addresses_count, - uc=len(github_users) - ) - ) - - def _retrieve_team_by_name_or_none( organization: github3.orgs.Organization, team_name: str