

def branches(self, user, repo, branch=None):
    "List a repo's branches or get a single branch (in a list).\n\n        :param str user: GitHub user name\n        :param str repo: GitHub repo name\n        :param str branch: Branch name if getting a single branch\n        :return: List of branch dicts\n            http://developer.github.com/v3/repos/#list-branches\n        "
    if branch:
        return [self.repo(user, repo).branch(branch)]
    return (branch.repo(user, repo).iter_branches() or [])

dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/github/api.py GitHubClient.branches/VarMisuse@45/170 `self`->`branch`