This is an archive of the discontinued LLVM Phabricator instance.

[NFC][polly] Convert some python scripts to Python 3 syntax
Needs ReviewPublic

Authored by thieta on Feb 9 2023, 11:38 PM.

Details

Reviewers
bollu
Summary

There was a few scripts still not converted to python 3 syntax
which was found when trying to apply automatic formatting on
all python files in the tree.

I don'tk now how to use these scripts so I haven't been able
to test them. But the diff looks very straight-forward.

Diff Detail

Event Timeline

thieta created this revision.Feb 9 2023, 11:38 PM
Herald added a project: Restricted Project. · View Herald Transcript
thieta requested review of this revision.Feb 9 2023, 11:38 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2023, 11:38 PM
Andi added a subscriber: Andi.Feb 10 2023, 9:24 AM
Andi added inline comments.Feb 10 2023, 9:31 AM
polly/utils/argparse.py
106

The contents of the try and except are now identical. Can this ever fail, or can the try/except be removed entirely now?

thieta added inline comments.Feb 10 2023, 9:51 AM
polly/utils/argparse.py
106

This seems like a construct to support both 2 and 3. So yeah basestring is no more in 3 so it could be removed.