diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2015-04-21 21:53:07 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2015-06-29 16:59:36 +0200 |
commit | 2896dc4083accd92c4b80ef4d9972c2e2009bda2 (patch) | |
tree | b1c5387735174df1248d59738fdd664d342a4bf7 /giscanner/maintransformer.py | |
parent | dea692d32ce1e5ce2f1fff27d322d34cd7841747 (diff) | |
download | gobject-introspection-2896dc4083accd92c4b80ef4d9972c2e2009bda2.tar.gz |
tests: Update misc/pep8.py to 1.6.2
Updated from:
https://raw.githubusercontent.com/jcrocholl/pep8/1.6.2/pep8.py
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r-- | giscanner/maintransformer.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index df598adf..b138a121 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -349,7 +349,7 @@ class MainTransformer(object): # (except enums and flags) or basic types that are # as big as a gpointer if array_type == ast.Array.GLIB_PTRARRAY: - if ((element_type in ast.BASIC_GIR_TYPES and not element_type in ast.POINTER_TYPES) + if ((element_type in ast.BASIC_GIR_TYPES and element_type not in ast.POINTER_TYPES) or isinstance(element_type, (ast.Enum, ast.Bitfield))): message.warn("invalid (element-type) for a GPtrArray, " "must be a pointer", annotations.position) @@ -358,7 +358,7 @@ class MainTransformer(object): if array_type == ast.Array.GLIB_BYTEARRAY: if element_type == ast.TYPE_ANY: array.element_type = ast.TYPE_UINT8 - elif not element_type in [ast.TYPE_UINT8, ast.TYPE_INT8, ast.TYPE_CHAR]: + elif element_type not in [ast.TYPE_UINT8, ast.TYPE_INT8, ast.TYPE_CHAR]: message.warn("invalid (element-type) for a GByteArray, " "must be one of guint8, gint8 or gchar", annotations.position) @@ -1250,8 +1250,8 @@ method or constructor of some type.""" """Look for virtual methods from the class structure.""" if not node.glib_type_struct: # https://bugzilla.gnome.org/show_bug.cgi?id=629080 - #message.warn_node(node, - # "Failed to find class structure for %r" % (node.name, )) + # message.warn_node(node, + # "Failed to find class structure for %r" % (node.name, )) return node_type = node.create_type() |