[gobject-introspection] giscanner: remove unneeded isinstance check
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner: remove unneeded isinstance check
- Date: Wed, 9 Oct 2013 17:00:30 +0000 (UTC)
commit d0c2f49a87a9b8db6aaed367544fabd612b0dc0b
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Sat Sep 7 00:16:17 2013 +0200
giscanner: remove unneeded isinstance check
_write_class() is only ever called with ast.Class
and ast.Interface nodes so the check served no purpose
other than contribute to global warming...
giscanner/girwriter.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/giscanner/girwriter.py b/giscanner/girwriter.py
index 2f3d59c..78ad7e4 100644
--- a/giscanner/girwriter.py
+++ b/giscanner/girwriter.py
@@ -436,9 +436,8 @@ class GIRWriter(XMLWriter):
if isinstance(node, ast.Class):
for method in sorted(node.constructors):
self._write_constructor(method)
- if isinstance(node, (ast.Class, ast.Interface)):
- for method in sorted(node.static_methods):
- self._write_static_method(method)
+ for method in sorted(node.static_methods):
+ self._write_static_method(method)
for vfunc in sorted(node.virtual_methods):
self._write_vfunc(vfunc)
for method in sorted(node.methods):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]