regolith/main.py
def filter_databases(rc):
    """Filters the databases list down to only the ones we need, in place."""
    dbs = rc.databases
    public_only = rc._get('public_only', False)
    if public_only:
        dbs = [db for db in dbs if db['public']]
    dbname = rc._get('db')
    if dbname is not None:
        dbs = [db for db in dbs if db['name'] == dbname]
    elif len(dbs) == 1:
        rc.db = dbs[0]['name']
    rc.databases = dbs
Filters the databases list down to only the ones we need, in place.
Filters the databases list down to only the ones we need, in place.
Filters the databases list down to only the ones we need in place .
def filter_databases(rc):
    dbs = rc.databases
    public_only = rc._get('public_only', False)
    if public_only:
        dbs = [db for db in dbs if db['public']]
    dbname = rc._get('db')
    if dbname is not None:
        dbs = [db for db in dbs if db['name'] == dbname]
    elif len(dbs) == 1:
        rc.db = dbs[0]['name']
    rc.databases = dbs
def filter_databases ( rc ) : dbs = rc . databases public_only = rc . _get ( 'public_only' , False ) if public_only : dbs = [ db for db in dbs if db [ 'public' ] ] dbname = rc . _get ( 'db' ) if dbname is not None : dbs = [ db for db in dbs if db [ 'name' ] == dbname ] elif len ( dbs ) == 1 : rc . db = dbs [ 0 ] [ 'name' ] rc . databases = dbs
Filters the databases list down to only the ones we need, in place.
Filters the databases list down to only the ones we need in place .
"""Filters the databases list down to only the ones we need, in place."""
rc