Commit 20d94d3b authored by Lisa Velden's avatar Lisa Velden Committed by Petr Pudlak
Browse files

Fix string formatting in private object representation

and use one-element tuplesfor string formatting
Signed-off-by: default avatarLisa Velden <>
Signed-off-by: default avatarPetr Pudlak <>
Reviewed-by: default avatarPetr Pudlak <>
parent 2a050e19
......@@ -253,10 +253,10 @@ class Private(object):
return self._item
def __str__(self):
return "<%s>" % self._descr
return "<%s>" % (self._descr, )
def __repr__(self):
return "Private(?, descr=%r)".format(self._descr)
return "Private(?, descr=%r)" % (self._descr, )
# pylint: disable=W0212
# If it doesn't access _item directly, the call will go through __getattr__
......@@ -280,7 +280,7 @@ class Private(object):
def __call__(self, *args, **kwargs):
return Private(self._item(*args, **kwargs),
descr="%s()" % self._descr)
descr="%s()" % (self._descr, ))
# pylint: disable=R0201
# While this could get away with being a function, it needs to be a method.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment