Fix #1335598 [corrupted tooltip with very long tweak setting](https://bugs.launchpad.net/calibre/+bug/1335598) and pep8