summaryrefslogtreecommitdiff
path: root/giscanner/annotationparser.py
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-08-12 14:06:46 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-10-08 20:53:29 +0200
commit49bc3e7ab8e1dd69ba89d1ae879f56af5b999d8c (patch)
tree834d7705fd3089aac62ff055df2158d8d4f74b15 /giscanner/annotationparser.py
parentfd6ebf476f9e55a4ea3b1e88abd05ce72eed1506 (diff)
downloadgobject-introspection-49bc3e7ab8e1dd69ba89d1ae879f56af5b999d8c.tar.gz
tests: Update misc/pep8.py to 1.4.6
Updated from: https://raw.github.com/jcrocholl/pep8/1.4.6/pep8.py
Diffstat (limited to 'giscanner/annotationparser.py')
-rw-r--r--giscanner/annotationparser.py47
1 files changed, 19 insertions, 28 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index a0657dc4..9d6a6b61 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -483,57 +483,48 @@ class DocTag(object):
int(v)
except (TypeError, ValueError):
if v is None:
- message.warn(
- 'array option %s needs a value' % (
- name, ),
- positions=self.position)
+ message.warn('array option %s needs a value' % (name, ),
+ positions=self.position)
else:
- message.warn(
- 'invalid array %s option value %r, '
- 'must be an integer' % (name, v, ),
- positions=self.position)
+ message.warn('invalid array %s option value %r, '
+ 'must be an integer' % (name, v, ),
+ positions=self.position)
elif name == OPT_ARRAY_LENGTH:
if v is None:
- message.warn(
- 'array option length needs a value',
- positions=self.position)
+ message.warn('array option length needs a value',
+ positions=self.position)
else:
- message.warn(
- 'invalid array annotation value: %r' % (
- name, ), self.position)
+ message.warn('invalid array annotation value: %r' % (name, ),
+ self.position)
def _validate_closure(self, option, value):
if value is not None and value.length() > 1:
- message.warn(
- 'closure takes at most 1 value, %d given' % (
- value.length(), ), self.position)
+ message.warn('closure takes at most 1 value, %d given' % (value.length(), ),
+ self.position)
def _validate_element_type(self, option, value):
self._validate_option(option, value, required=True)
if value is None:
- message.warn(
- 'element-type takes at least one value, none given',
- self.position)
+ message.warn('element-type takes at least one value, none given',
+ self.position)
return
if value.length() > 2:
- message.warn(
- 'element-type takes at most 2 values, %d given' % (
- value.length(), ), self.position)
+ message.warn('element-type takes at most 2 values, %d given' % (value.length(), ),
+ self.position)
return
def _validate_out(self, option, value):
if value is None:
return
if value.length() > 1:
- message.warn(
- 'out annotation takes at most 1 value, %d given' % (
- value.length(), ), self.position)
+ message.warn('out annotation takes at most 1 value, %d given' % (value.length(), ),
+ self.position)
return
value_str = value.one()
if value_str not in [OPT_OUT_CALLEE_ALLOCATES,
OPT_OUT_CALLER_ALLOCATES]:
- message.warn("out annotation value is invalid: %r" % (
- value_str, ), self.position)
+ message.warn("out annotation value is invalid: %r" % (value_str, ),
+ self.position)
return
def _get_gtk_doc_value(self):