diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2015-04-21 21:53:07 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2015-06-25 21:29:05 +0200 |
commit | a1fb01e08df6e6f81d76220f5f5e576be4188997 (patch) | |
tree | 6ef80b4bcd2d5b9658702ac5b49f966a55920898 /giscanner/maintransformer.py | |
parent | bce29907c6dff1ee45e766d0be5dfedbc4589750 (diff) | |
download | gobject-introspection-a1fb01e08df6e6f81d76220f5f5e576be4188997.tar.gz |
tests: Update misc/pep8.py to 1.6.2wip/dieterv/drive-by-review
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() |