[gobject-introspection] giscanner: use "if in [a, b]" instead of "if == a or if == b"
- From: Dieter Verfaillie <dieterv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] giscanner: use "if in [a, b]" instead of "if == a or if == b"
- Date: Wed, 28 Nov 2012 20:56:45 +0000 (UTC)
commit d6c2ad348892c32a42d112d94168ac071a14c0a2
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Tue Nov 20 07:54:43 2012 +0100
giscanner: use "if in [a, b]" instead of "if == a or if == b"
It simply looks better...
https://bugzilla.gnome.org/show_bug.cgi?id=688897
giscanner/annotationparser.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 764d594..d498913 100644
--- a/giscanner/annotationparser.py
+++ b/giscanner/annotationparser.py
@@ -779,7 +779,7 @@ class AnnotationParser(object):
# line, we must be parsing the comment block description.
####################################################################
if (EMPTY_LINE_RE.search(line)
- and (in_part == PART_IDENTIFIER or in_part == PART_PARAMETERS)):
+ and in_part in [PART_IDENTIFIER, PART_PARAMETERS]):
in_part = PART_DESCRIPTION
continue
@@ -844,7 +844,7 @@ class AnnotationParser(object):
# If we get here, we must be in the middle of a multiline
# comment block, parameter or tag description.
####################################################################
- if in_part == PART_DESCRIPTION or in_part == PART_IDENTIFIER:
+ if in_part in [PART_IDENTIFIER, PART_DESCRIPTION]:
if not comment_block.comment:
# Backwards compatibility with old style GTK-Doc
# comment blocks where Description used to be a comment
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]