mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Sync GithubIntegration __init__ arguments with github.Github (#2556)
Github and GithubIntegration now both support the same (full) set of Requester arguments. Creating a Github instance for a Github App Installation coming from GithubIntegration uses the same Requester arguments (except for auth).
This commit is contained in:
+4
-1
@@ -83,6 +83,7 @@ class Github:
|
||||
This is the main class you instantiate to access the Github API v3. Optional parameters allow different authentication methods.
|
||||
"""
|
||||
|
||||
# keep non-deprecated arguments in-sync with Requester
|
||||
# v2: remove login_or_token, password, jwt and app_auth
|
||||
# v2: move auth to the front of arguments
|
||||
# v2: add * before first argument so all arguments must be named,
|
||||
@@ -95,7 +96,7 @@ class Github:
|
||||
app_auth=None,
|
||||
base_url=Consts.DEFAULT_BASE_URL,
|
||||
timeout=Consts.DEFAULT_TIMEOUT,
|
||||
user_agent="PyGithub/Python",
|
||||
user_agent=Consts.DEFAULT_USER_AGENT,
|
||||
per_page=Consts.DEFAULT_PER_PAGE,
|
||||
verify=True,
|
||||
retry=None,
|
||||
@@ -123,6 +124,8 @@ class Github:
|
||||
assert isinstance(base_url, str), base_url
|
||||
assert isinstance(timeout, int), timeout
|
||||
assert user_agent is None or isinstance(user_agent, str), user_agent
|
||||
assert isinstance(per_page, int), per_page
|
||||
assert isinstance(verify, (bool, str)), verify
|
||||
assert (
|
||||
retry is None
|
||||
or isinstance(retry, int)
|
||||
|
||||
Reference in New Issue
Block a user