[PATCH] D67817: [LNT] Python 3 support: adapt to map returning a view
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 12:30:08 PDT 2019
hubert.reinterpretcast added inline comments.
================
Comment at: lnt/external/stats/pstat.py:513
+ items = list(map(makestr, items))
+ maxsize[col] = max(list(map(len, items))) + extra
for row in lst:
----------------
`max(map(lambda item: len(makestr(item)), items))`?
================
Comment at: lnt/external/stats/stats.py:1632
+ items = list(map(pstat.makestr, items))
+ maxsize[col] = max(list(map(len, items))) + extra
for row in listoflists:
----------------
See above.
================
Comment at: lnt/lnttool/main.py:173
test_names = lnt.tests.get_names()
- max_name = max(map(len, test_names))
+ max_name = max(list(map(len, test_names)))
for name in test_names:
----------------
I believe the change to this line is not necessary.
================
Comment at: lnt/server/db/migrate.py:83
# Check the version numbers for validity.
- version, next_version = map(int, m.groups())
+ version, next_version = list(map(int, m.groups()))
if next_version != version + 1:
----------------
The unpacking works fine without the change even with Python 3.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67817/new/
https://reviews.llvm.org/D67817
More information about the llvm-commits
mailing list