From 0ebdbb26750fb4a6f026c4047754e0bcd99ea7ef Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 15 Apr 2020 10:52:13 +1000 Subject: [PATCH] Export IncompletableObject in the github namespace (#1450) When IncompletableObject was added, it was only added to GithubException, and not imported directly into the github namespace like other exceptions. Correct that, and clean up the resultant now unrequired import. --- github/__init__.py | 2 ++ tests/Exceptions.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/github/__init__.py b/github/__init__.py index 56c870f6..cc7d1496 100644 --- a/github/__init__.py +++ b/github/__init__.py @@ -46,6 +46,7 @@ from .GithubException import ( # type: ignore BadCredentialsException, BadUserAgentException, GithubException, + IncompletableObject, RateLimitExceededException, TwoFactorException, UnknownObjectException, @@ -73,6 +74,7 @@ __all__ = [ Github, GithubException, GithubIntegration, + IncompletableObject, InputFileContent, InputGitAuthor, InputGitTreeElement, diff --git a/tests/Exceptions.py b/tests/Exceptions.py index eb9531b6..4d94fc10 100644 --- a/tests/Exceptions.py +++ b/tests/Exceptions.py @@ -34,7 +34,6 @@ import pickle import github -from github.GithubException import IncompletableObject from . import Framework @@ -142,4 +141,4 @@ class SpecificExceptions(Framework.TestCase): def testIncompletableObject(self): github.UserKey.UserKey.setCheckAfterInitFlag(False) obj = github.UserKey.UserKey(None, {}, {}, False) - self.assertRaises(IncompletableObject, obj._completeIfNeeded) + self.assertRaises(github.IncompletableObject, obj._completeIfNeeded)