diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2014-04-28 17:23:19 -0700 |
---|---|---|
committer | Thomas A Caswell <tcaswell@gmail.com> | 2015-09-29 15:12:41 -0400 |
commit | 750060dc0211cfb5786ba39da7283e5885eac7ad (patch) | |
tree | 28337e94a44554ecf2c8263a8068e303f814b0dc /giscanner/annotationparser.py | |
parent | 06166e54cea2302bf9213f18881495eb2b5d089d (diff) | |
download | gobject-introspection-750060dc0211cfb5786ba39da7283e5885eac7ad.tar.gz |
giscanner: Replace repr format usage with string formatter
Replace occurances of "%r" (repr) in format strings where the intended
behaviour is to output a quoted string "'foo'" with explicit usage
of "'%s'". This is needed to move the codebase to unicode literals
in order to upgrade to Python 3. Python 2 unicode strings are expanded
with repr formatting prefixed with a "u" as in "u'foo'" which causes
failures for various text formatting scenarios.
https://bugzilla.gnome.org/show_bug.cgi?id=679438
Diffstat (limited to 'giscanner/annotationparser.py')
-rw-r--r-- | giscanner/annotationparser.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index 99502b28..09026a4c 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -543,7 +543,7 @@ class GtkDocAnnotatable(object): self.annotations = GtkDocAnnotations() def __repr__(self): - return '<GtkDocAnnotatable %r %r>' % (self.annotations, ) + return "<GtkDocAnnotatable '%s' %r>" % (self.annotations, ) def validate(self): ''' @@ -984,7 +984,7 @@ class GtkDocParameter(GtkDocAnnotatable): self.description = None def __repr__(self): - return '<GtkDocParameter %r %r>' % (self.name, self.annotations) + return "<GtkDocParameter '%s' %r>" % (self.name, self.annotations) class GtkDocTag(GtkDocAnnotatable): @@ -1010,7 +1010,7 @@ class GtkDocTag(GtkDocAnnotatable): self.description = None def __repr__(self): - return '<GtkDocTag %r %r>' % (self.name, self.annotations) + return "<GtkDocTag '%s' %r>" % (self.name, self.annotations) class GtkDocCommentBlock(GtkDocAnnotatable): @@ -1060,7 +1060,7 @@ class GtkDocCommentBlock(GtkDocAnnotatable): return cmp(self.name, other.name) def __repr__(self): - return '<GtkDocCommentBlock %r %r>' % (self.name, self.annotations) + return "<GtkDocCommentBlock '%s' %r>" % (self.name, self.annotations) def validate(self): ''' |