[PATCH] D67967: [LNT] rename object variables
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 25 00:40:39 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL372818: [LNT] rename object variables (authored by thopre, committed by ).
Herald added a project: LLVM.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67967/new/
https://reviews.llvm.org/D67967
Files:
lnt/trunk/lnt/server/ui/filters.py
lnt/trunk/lnt/server/ui/util.py
Index: lnt/trunk/lnt/server/ui/util.py
===================================================================
--- lnt/trunk/lnt/server/ui/util.py
+++ lnt/trunk/lnt/server/ui/util.py
@@ -84,7 +84,7 @@
return ('\n' + prependStr).join(str.splitlines())
-def pprint(object, useRepr=True):
+def pprint(obj, useRepr=True):
def recur(ob):
return pprint(ob, useRepr)
@@ -97,16 +97,16 @@
def pprintArgs(name, args):
return wrapString(name + '(', ',\n'.join(map(recur, args)), ')')
- if isinstance(object, tuple):
- return wrapString('(', ',\n'.join(map(recur, object)),
- [')', ',)'][len(object) == 1])
- elif isinstance(object, list):
- return wrapString('[', ',\n'.join(map(recur, object)), ']')
- elif isinstance(object, set):
- return pprintArgs('set', list(object))
- elif isinstance(object, dict):
+ if isinstance(obj, tuple):
+ return wrapString('(', ', \n'.join(map(recur, obj)),
+ [')', ',)'][len(obj) == 1])
+ elif isinstance(obj, list):
+ return wrapString('[', ', \n'.join(map(recur, obj)), ']')
+ elif isinstance(obj, set):
+ return pprintArgs('set', list(obj))
+ elif isinstance(obj, dict):
elts = []
- for k, v in object.items():
+ for k, v in obj.items():
kr = recur(k)
vr = recur(v)
elts.append('%s : %s' % (kr,
@@ -116,12 +116,12 @@
return wrapString('{', ',\n'.join(elts), '}')
else:
if useRepr:
- return repr(object)
- return str(object)
+ return repr(obj)
+ return str(obj)
-def prefixAndPPrint(prefix, object, useRepr=True):
- return prefix + prependLines(' ' * len(prefix), pprint(object, useRepr))
+def prefixAndPPrint(prefix, obj, useRepr=True):
+ return prefix + prependLines(' ' * len(prefix), pprint(obj, useRepr))
def clamp(v, minVal, maxVal):
Index: lnt/trunk/lnt/server/ui/filters.py
===================================================================
--- lnt/trunk/lnt/server/ui/filters.py
+++ lnt/trunk/lnt/server/ui/filters.py
@@ -73,6 +73,6 @@
def register(env):
- for name, object in globals().items():
+ for name, obj in globals().items():
if name.startswith('filter_'):
- env.filters[name[7:]] = object
+ env.filters[name[7:]] = obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67967.221679.patch
Type: text/x-patch
Size: 2394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190925/e285acba/attachment.bin>
More information about the llvm-commits
mailing list