mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Remove trailing spaces
This commit is contained in:
parent
48f057ea81
commit
0a5472e697
42 changed files with 815 additions and 817 deletions
|
@ -30,7 +30,7 @@ def escape(ret):
|
|||
ret=ret.replace("'","'");
|
||||
ret=ret.replace("\"",""");
|
||||
return ret
|
||||
|
||||
|
||||
|
||||
def inc_tab():
|
||||
global tab
|
||||
|
@ -50,34 +50,34 @@ def get_tag(node,name):
|
|||
return tag
|
||||
|
||||
def find_method_descr(old_class,name):
|
||||
|
||||
methods = old_class.find("methods")
|
||||
|
||||
methods = old_class.find("methods")
|
||||
if(methods!=None and len(list(methods))>0):
|
||||
for m in list(methods):
|
||||
if (m.attrib["name"]==name):
|
||||
description=m.find("description")
|
||||
if (description!=None and description.text.strip()!=""):
|
||||
return description.text
|
||||
|
||||
|
||||
return None
|
||||
|
||||
def find_signal_descr(old_class,name):
|
||||
|
||||
signals = old_class.find("signals")
|
||||
|
||||
signals = old_class.find("signals")
|
||||
if(signals!=None and len(list(signals))>0):
|
||||
for m in list(signals):
|
||||
if (m.attrib["name"]==name):
|
||||
description=m.find("description")
|
||||
if (description!=None and description.text.strip()!=""):
|
||||
return description.text
|
||||
|
||||
|
||||
return None
|
||||
|
||||
def find_constant_descr(old_class,name):
|
||||
|
||||
if (old_class==None):
|
||||
return None
|
||||
constants = old_class.find("constants")
|
||||
return None
|
||||
constants = old_class.find("constants")
|
||||
if(constants!=None and len(list(constants))>0):
|
||||
for m in list(constants):
|
||||
if (m.attrib["name"]==name):
|
||||
|
@ -98,31 +98,31 @@ def write_class(c):
|
|||
inherits=get_tag(c,"inherits")
|
||||
write_string(f,'<class name="'+class_name+'" '+category+inherits+'>')
|
||||
inc_tab()
|
||||
|
||||
|
||||
write_string(f,"<brief_description>")
|
||||
|
||||
if (old_class!=None):
|
||||
old_brief_descr=old_class.find("brief_description")
|
||||
if (old_brief_descr!=None):
|
||||
write_string(f,escape(old_brief_descr.text.strip()))
|
||||
|
||||
|
||||
|
||||
|
||||
write_string(f,"</brief_description>")
|
||||
|
||||
|
||||
write_string(f,"<description>")
|
||||
if (old_class!=None):
|
||||
old_descr=old_class.find("description")
|
||||
if (old_descr!=None):
|
||||
write_string(f,escape(old_descr.text.strip()))
|
||||
|
||||
|
||||
write_string(f,"</description>")
|
||||
|
||||
methods = c.find("methods")
|
||||
methods = c.find("methods")
|
||||
if(methods!=None and len(list(methods))>0):
|
||||
|
||||
write_string(f,"<methods>")
|
||||
inc_tab()
|
||||
|
||||
|
||||
for m in list(methods):
|
||||
qualifiers=get_tag(m,"qualifiers")
|
||||
|
||||
|
@ -135,7 +135,7 @@ def write_class(c):
|
|||
write_string(f,'<return'+typ+'>');
|
||||
write_string(f,'</return>');
|
||||
elif (a.tag=="argument"):
|
||||
|
||||
|
||||
default=get_tag(a,"default")
|
||||
|
||||
write_string(f,'<argument index="'+a.attrib["index"]+'" name="'+escape(a.attrib["name"])+'" type="'+a.attrib["type"]+'"' +default+'>');
|
||||
|
@ -146,20 +146,20 @@ def write_class(c):
|
|||
old_method_descr=find_method_descr(old_class,m.attrib["name"])
|
||||
if (old_method_descr):
|
||||
write_string(f,escape(escape(old_method_descr.strip())))
|
||||
|
||||
|
||||
write_string(f,'</description>');
|
||||
dec_tab()
|
||||
dec_tab()
|
||||
write_string(f,"</method>")
|
||||
dec_tab()
|
||||
write_string(f,"</methods>")
|
||||
|
||||
signals = c.find("signals")
|
||||
signals = c.find("signals")
|
||||
if(signals!=None and len(list(signals))>0):
|
||||
|
||||
write_string(f,"<signals>")
|
||||
inc_tab()
|
||||
|
||||
for m in list(signals):
|
||||
|
||||
for m in list(signals):
|
||||
|
||||
write_string(f,'<signal name="'+escape(m.attrib["name"])+'">')
|
||||
inc_tab()
|
||||
|
@ -176,18 +176,18 @@ def write_class(c):
|
|||
if (old_signal_descr):
|
||||
write_string(f,escape(old_signal_descr.strip()))
|
||||
write_string(f,'</description>');
|
||||
dec_tab()
|
||||
dec_tab()
|
||||
write_string(f,"</signal>")
|
||||
dec_tab()
|
||||
write_string(f,"</signals>")
|
||||
|
||||
constants = c.find("constants")
|
||||
constants = c.find("constants")
|
||||
if(constants!=None and len(list(constants))>0):
|
||||
|
||||
write_string(f,"<constants>")
|
||||
inc_tab()
|
||||
|
||||
for m in list(constants):
|
||||
|
||||
for m in list(constants):
|
||||
|
||||
write_string(f,'<constant name="'+escape(m.attrib["name"])+'" value="'+m.attrib["value"]+'">')
|
||||
old_constant_descr=find_constant_descr(old_class,m.attrib["name"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue