PEP8 cleanup of ws.py

Ref: #706