mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Be explicit about argumentChecker object
This commit is contained in:
@@ -74,9 +74,9 @@ class ListCapacityWithModifier( ListCapacity ):
|
||||
return attributes
|
||||
|
||||
class ElementCreatable( ListCapacityWithModifier ):
|
||||
def __init__( self, mandatoryParameters, optionalParameters, attributeModifiers = {} ):
|
||||
def __init__( self, parameters = NoParameters(), attributeModifiers = {} ):
|
||||
ListCapacityWithModifier.__init__( self, attributeModifiers )
|
||||
self.__argumentsChecker = ArgumentsChecker( mandatoryParameters, optionalParameters )
|
||||
self.__argumentsChecker = parameters
|
||||
|
||||
def apply( self, cls ):
|
||||
cls._addMethod( "create_" + self.singularName, self.__execute )
|
||||
@@ -99,9 +99,9 @@ class ElementCreatable( ListCapacityWithModifier ):
|
||||
return "* `create_" + self.singularName + "(" + self.__argumentsChecker.documentParameters() + ")`: " + self.typePolicy.documentTypeName() + "\n"
|
||||
|
||||
class ElementGetable( ListCapacityWithModifier ):
|
||||
def __init__( self, mandatoryParameters, optionalParameters, attributeModifiers = {} ):
|
||||
def __init__( self, parameters = NoParameters(), attributeModifiers = {} ):
|
||||
ListCapacityWithModifier.__init__( self, attributeModifiers )
|
||||
self.__argumentsChecker = ArgumentsChecker( mandatoryParameters, optionalParameters )
|
||||
self.__argumentsChecker = parameters
|
||||
|
||||
def apply( self, cls ):
|
||||
cls._addMethod( "get_" + self.singularName, self.__execute )
|
||||
@@ -155,9 +155,9 @@ class SeveralElementsRemovable( ListCapacity ):
|
||||
return "* `remove_from_" + self.safeAttributeName + "( " + self.singularName + ", ... )`\n * `" + self.singularName + "`: " + self.typePolicy.documentTypeName() + "\n"
|
||||
|
||||
class ListGetable( ListCapacityWithModifier ):
|
||||
def __init__( self, mandatoryParameters, optionalParameters, attributeModifiers = {} ):
|
||||
def __init__( self, parameters = NoParameters(), attributeModifiers = {} ):
|
||||
ListCapacityWithModifier.__init__( self, attributeModifiers )
|
||||
self.__argumentsChecker = ArgumentsChecker( mandatoryParameters, optionalParameters )
|
||||
self.__argumentsChecker = parameters
|
||||
|
||||
def apply( self, cls ):
|
||||
cls._addMethod( "get_" + self.safeAttributeName, self.__execute )
|
||||
|
||||
Reference in New Issue
Block a user