cleanup: consistent spacing in imports
endpoint: fix issues with Python urlparse support
endpoint: check and fix diagnostics for uri/option conversion