various fix and pep check
various fix and pep check


Former-commit-id: f8b691d246e47316c4aecf2fa9b2c80bedc1ecd7 [formerly 30f81778d74c4cbd2547f0e26cfd1af935799b69]
Former-commit-id: da15f95e1bc38b2aff8fd349b4445db7c2af19a1
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine