jet-admin / jet-bridge

Unnecessary else / elif used after return PYL-R1705
Style
Major
3 occurrences in this check
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
305def get_conf(request):
306    request_conf = get_request_conf(request)
307
308    if request_conf:309        return request_conf
310    else:
311        return get_settings_conf()
Unnecessary "elif" after "return", remove the leading "el" from "elif"
158        raise Exception('Database configuration is not set')
159
160    def get_engine():
161        if conf.get('engine') == 'sqlite':162            return create_engine(engine_url)
163        elif conf.get('engine') == 'bigquery':
164            return create_engine(
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
146    connection_params_id = get_connection_params_id(conf)
147
148    if connection_id in connections:
149        if connections[connection_id]['params_id'] == connection_params_id:150            return connections[connection_id]
151        else:
152            disconnect_database(conf)