From 0d08cad3f17c45d6304657e0b35208854a65ef8b Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Tue, 12 Mar 2024 16:36:59 +0000 Subject: [PATCH] Use newer type stubs branch. --- repo_helper_bot/updater.py | 2 ++ stubs.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/repo_helper_bot/updater.py b/repo_helper_bot/updater.py index 2b32cca..2a2553b 100644 --- a/repo_helper_bot/updater.py +++ b/repo_helper_bot/updater.py @@ -46,6 +46,7 @@ from github3.exceptions import NotFoundError from github3.pulls import ShortPullRequest from github3.repos import Repository as GitHubRepository +from github3.session import GitHubSession from github3_utils.apps import iter_installed_repos from repo_helper.cli.utils import commit_changed_files # nodep from repo_helper.core import RepoHelper # nodep @@ -296,6 +297,7 @@ def get_installation_access_token( headers = apps.create_jwt_headers(GITHUBAPP_KEY, GITHUBAPP_ID, expire_in=30) url = github_repo._build_url("app", "installations", str(installation_id), "access_tokens") + assert isinstance(github_repo.session, GitHubSession) with github_repo.session.no_auth(): response = github_repo.session.post(url, headers=headers) json_response = github_repo._json(response, 201) diff --git a/stubs.txt b/stubs.txt index 7d1c664..43ed32f 100644 --- a/stubs.txt +++ b/stubs.txt @@ -2,4 +2,4 @@ git+https://github.com/domdfcoding/dulwich-stubs git+https://github.com/domdfcoding/pytest-regressions-stubs sqlalchemy-stubs git+https://github.com/ssfdust/flask-sqlalchemy-stubs -git+https://github.com/domdfcoding/github3.py@stubs +git+https://github.com/domdfcoding/github3.py@stubs-v4