mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
codegen: Fix whitespace
This is Python, not C.
This commit is contained in:
parent
fe3f699371
commit
128ae2b5f5
@ -77,13 +77,13 @@ class DBusXMLParser:
|
|||||||
colon_index = line.find(": ")
|
colon_index = line.find(": ")
|
||||||
if colon_index == -1:
|
if colon_index == -1:
|
||||||
if line.endswith(":"):
|
if line.endswith(":"):
|
||||||
symbol = line[0 : len(line) - 1]
|
symbol = line[0:len(line) - 1]
|
||||||
comment_state = DBusXMLParser.COMMENT_STATE_PARAMS
|
comment_state = DBusXMLParser.COMMENT_STATE_PARAMS
|
||||||
else:
|
else:
|
||||||
comment_state = DBusXMLParser.COMMENT_STATE_SKIP
|
comment_state = DBusXMLParser.COMMENT_STATE_SKIP
|
||||||
else:
|
else:
|
||||||
symbol = line[0:colon_index]
|
symbol = line[0:colon_index]
|
||||||
rest_of_line = line[colon_index + 2 :].strip()
|
rest_of_line = line[colon_index + 2:].strip()
|
||||||
if len(rest_of_line) > 0:
|
if len(rest_of_line) > 0:
|
||||||
body += f"{rest_of_line}\n"
|
body += f"{rest_of_line}\n"
|
||||||
comment_state = DBusXMLParser.COMMENT_STATE_PARAMS
|
comment_state = DBusXMLParser.COMMENT_STATE_PARAMS
|
||||||
@ -98,7 +98,7 @@ class DBusXMLParser:
|
|||||||
body += f"{orig_line}\n"
|
body += f"{orig_line}\n"
|
||||||
else:
|
else:
|
||||||
param = line[1:colon_index]
|
param = line[1:colon_index]
|
||||||
docs = line[colon_index + 2 :]
|
docs = line[colon_index + 2:]
|
||||||
params[param] = docs
|
params[param] = docs
|
||||||
else:
|
else:
|
||||||
comment_state = DBusXMLParser.COMMENT_STATE_BODY
|
comment_state = DBusXMLParser.COMMENT_STATE_BODY
|
||||||
|
Loading…
Reference in New Issue
Block a user