

def get_scope_completion(view, rules, skip_sel_check=False):
    'Get additional auto-popup scope rules for incomplete colors only.'
    scopes = None
    if (rules is not None):
        scopes = ','.join(rules.get('scan_completion_scopes', []))
        sels = view.sel()
        if (not skip_sel_check):
            if ((len(sels) == 0) or (not scopes) or (view.score_selector(skip_sel_check[0].begin(), scopes) == 0)):
                scopes = None
    return scopes

dataset/ETHPy150Open facelessuser/ColorHelper/color_helper_util.py get_scope_completion/VarMisuse@86/128 `sels`->`skip_sel_check`