[editor] PEP8/Lint Fixes

- PEP8 Fixes.
- Lint Fixes.
- Add DocString.
- Add encoding declaration.