[gobject-introspection] giscanner: Fix make check issues
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner: Fix make check issues
- Date: Wed, 29 Aug 2012 08:40:19 +0000 (UTC)
commit db75707773c88e2d6aaace3afebe36ea7a42b42e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Aug 29 05:26:08 2012 -0300
giscanner: Fix make check issues
Whoops.
giscanner/docmain.py | 2 +-
giscanner/mallardwriter.py | 24 +++++++++++++-----------
2 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/giscanner/docmain.py b/giscanner/docmain.py
index 0ee85ff..8089a6b 100644
--- a/giscanner/docmain.py
+++ b/giscanner/docmain.py
@@ -39,7 +39,7 @@ def doc_main(args):
if not options.output:
raise SystemExit("missing output parameter")
if not os.path.isdir(options.output):
- raise SystemExit("wrong output parameter: %s" % (options.output,))
+ raise SystemExit("wrong output parameter: %s" % (options.output, ))
if len(args) < 2:
raise SystemExit("Need an input GIR filename")
diff --git a/giscanner/mallardwriter.py b/giscanner/mallardwriter.py
index ddf552c..1134d14 100644
--- a/giscanner/mallardwriter.py
+++ b/giscanner/mallardwriter.py
@@ -107,12 +107,13 @@ class TemplatedScanner(object):
return [(name, unmangle(spec, name)) for name, spec in specs]
def make_regex(self, specs):
- regex = '|'.join('(?P<%s>%s)' % (name, spec) for name, spec in specs if not name.startswith('!'))
+ regex = '|'.join('(?P<%s>%s)' % (name, spec) for name, spec in specs
+ if not name.startswith('!'))
return re.compile(regex)
def get_properties(self, name, match):
groupdict = match.groupdict()
- properties = { name: groupdict.pop(name) }
+ properties = {name: groupdict.pop(name)}
name = name + "_"
for group, value in groupdict.iteritems():
if group.startswith(name):
@@ -141,13 +142,13 @@ class TemplatedScanner(object):
class DocstringScanner(TemplatedScanner):
def __init__(self):
specs = [
- ('!alpha' , r'[a-zA-Z0-9_]+'),
- ('!alpha_dash' , r'[a-zA-Z0-9_-]+'),
- ('property' , r'<<type_name:type_name>>:(<<property_name:alpha_dash>>)'),
- ('signal' , r'<<type_name:type_name>>::(<<signal_name:alpha_dash>>)'),
- ('type_name' , r'#(<<type_name:alpha>>)'),
- ('fundamental' , r'%(<<fundamental:alpha>>)'),
- ('function_call' , r'<<symbol_name:alpha>>\(\)'),
+ ('!alpha', r'[a-zA-Z0-9_]+'),
+ ('!alpha_dash', r'[a-zA-Z0-9_-]+'),
+ ('property', r'<<type_name:type_name>>:(<<property_name:alpha_dash>>)'),
+ ('signal', r'<<type_name:type_name>>::(<<signal_name:alpha_dash>>)'),
+ ('type_name', r'#(<<type_name:alpha>>)'),
+ ('fundamental', r'%(<<fundamental:alpha>>)'),
+ ('function_call', r'<<symbol_name:alpha>>\(\)'),
]
super(DocstringScanner, self).__init__(specs)
@@ -212,7 +213,8 @@ class MallardFormatter(object):
if node is None:
return match
- return '<link xref="%s">%s</link>' % (make_page_id(namespace, node), self.format_function_name(node))
+ return '<link xref="%s">%s</link>' % (make_page_id(namespace, node),
+ self.format_function_name(node))
def _process_fundamental(self, namespace, match, props):
raise NotImplementedError
@@ -329,7 +331,7 @@ class MallardWriter(object):
try:
formatter_class = LANGUAGES[language.lower()]
except KeyError:
- raise SystemExit("Unsupported language: %s" % (language,))
+ raise SystemExit("Unsupported language: %s" % (language, ))
self._formatter = formatter_class(self._transformer)
self._language = self._formatter.language
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]