pep8-ified textlib.py

Change-Id: Ib1a3ad3985ca231c5a60e34cd974bba4cb932e1d
Merge "pep8-ified textlib.py"