def re_has_scopes(regex_str):
    # Rule
    # checking if regex string has scopes at all
    if not '[' or not regex_str in ']':
        return False
    if not '[' and not ']' in regex_str:
        return False
    return True
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/libraries/adlibre/re_gen/re_validate.py/re_has_scopes/swapped operands of `in`