mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
Experiment with auto-documentation
This commit is contained in:
@@ -19,3 +19,18 @@ class ArgumentsChecker:
|
||||
if argumentName not in data:
|
||||
raise TypeError()
|
||||
return data
|
||||
|
||||
def documentParameters( self ):
|
||||
mandatory = ", ".join( self.__mandatoryParameters )
|
||||
optional = "[" + ", ".join( self.__optionalParameters ) + "]"
|
||||
|
||||
if len( self.__mandatoryParameters ) == 0:
|
||||
if len( self.__optionalParameters ) == 0:
|
||||
return ""
|
||||
else:
|
||||
return " " + optional + " "
|
||||
else:
|
||||
if len( self.__optionalParameters ) == 0:
|
||||
return " " + mandatory + " "
|
||||
else:
|
||||
return " " + mandatory + ", " + optional + " "
|
||||
|
||||
Reference in New Issue
Block a user