fixed sphinx doc generator
- arguments, return values indentation means they get correctly interpreted by sphinx - functions with no return values were displaying return as () - return values were getting the '(optional)' added in some cases. Example: http://www.blender.org/documentation/250PythonDoc/bpy.ops.object.html
This commit is contained in:
@@ -201,7 +201,7 @@ class InfoPropertyRNA:
|
||||
return "%s=%s" % (self.identifier, default)
|
||||
return self.identifier
|
||||
|
||||
def get_type_description(self, as_arg=False, class_fmt="%s"):
|
||||
def get_type_description(self, as_ret=False, as_arg=False, class_fmt="%s"):
|
||||
type_str = ""
|
||||
if self.fixed_type is None:
|
||||
type_str += self.type
|
||||
@@ -223,7 +223,9 @@ class InfoPropertyRNA:
|
||||
|
||||
type_str += collection_str + (class_fmt % self.fixed_type.identifier)
|
||||
|
||||
if as_arg:
|
||||
if as_ret:
|
||||
pass
|
||||
elif as_arg:
|
||||
if not self.is_required:
|
||||
type_str += ", (optional)"
|
||||
else: # readonly is only useful for selfs, not args
|
||||
|
Reference in New Issue
Block a user