mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
Only one class per file
This commit is contained in:
+10
-9
@@ -2,7 +2,8 @@
|
||||
# Do not modify it manually, your work would be lost.
|
||||
|
||||
import PaginatedList
|
||||
from GithubObject import *
|
||||
import GithubException
|
||||
from DefaultValueForOptionalParameters import DefaultValueForOptionalParameters
|
||||
import Repository
|
||||
import NamedUser
|
||||
|
||||
@@ -52,7 +53,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def add_to_repos( self, repo ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
@@ -63,7 +64,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def delete( self ):
|
||||
status, headers, data = self.__requester.request(
|
||||
@@ -73,7 +74,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def edit( self, name, permission = DefaultValueForOptionalParameters ):
|
||||
assert isinstance( name, ( str, unicode ) ), name
|
||||
@@ -91,7 +92,7 @@ class Team( object ):
|
||||
post_parameters
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
self.__useAttributes( data )
|
||||
|
||||
def get_members( self ):
|
||||
@@ -102,7 +103,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
NamedUser.NamedUser,
|
||||
self.__requester,
|
||||
@@ -118,7 +119,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
return PaginatedList.PaginatedList(
|
||||
Repository.Repository,
|
||||
self.__requester,
|
||||
@@ -155,7 +156,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def remove_from_repos( self, repo ):
|
||||
assert isinstance( repo, Repository.Repository ), repo
|
||||
@@ -166,7 +167,7 @@ class Team( object ):
|
||||
None
|
||||
)
|
||||
if self.__requester.isFailureStatus( status ): # pragma no branch
|
||||
raise GithubException( status, data ) # pragma no cover
|
||||
raise GithubException.GithubException( status, data ) # pragma no cover
|
||||
|
||||
def __initAttributes( self ):
|
||||
self.__id = None
|
||||
|
||||
Reference in New Issue
Block a user