This is an archive of the discontinued LLVM Phabricator instance.

[lldb][NFC] Remove 'from __future__ import print_function' from all tests that don't actually call 'print()'
ClosedPublic

Authored by teemperor on Dec 13 2019, 12:24 AM.

Details

Summary

A lot of tests do this trick but the vast majority of them don't even call print().

Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no print ( or print( anywhere else in the file.
I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like expr print(...) and similar false-positives).
I also corrected the additional empty lines after the import in the files that I manually edited.

Diff Detail

Event Timeline

teemperor created this revision.Dec 13 2019, 12:24 AM
Herald added a project: Restricted Project. · View Herald Transcript

I tested this on python2 (macOS) and python3 (Arch Linux) so this shouldn't break any test.

labath accepted this revision.Dec 13 2019, 2:58 AM
This revision is now accepted and ready to land.Dec 13 2019, 2:58 AM
This revision was automatically updated to reflect the committed changes.