def fix_scheme_in_view(view, regenerate=False, ignore_flags=False):
  """Change color scheme in settings relevant to current view"""
  fix_flag = settings().get("fix_color_schemes", False)
  (fix_syntax, fix_global, fix_custom) = (False, False, False)
  custom_files = []
  if fix_flag == True:
    (fix_syntax, fix_global) = (True, True)
  elif isinstance(fix_flag, list):
    for label in fix_flag:
      if ("syntax", "syntax-specific") in label:
        fix_syntax = True
      if label in ("user", "global", "preferences"):
        fix_global = True
      if ".sublime-settings" in label:
        fix_custom = True
        custom_files.append(label)
  elif ignore_flags:
    pass # otherwise we might quit when we want to force a check contrary to user prefs
  else:
    return # setting is false, nonexistant, or malformed, so exit

  current_scheme = view.settings().get("color_scheme")
  modified_marker = ".gcfix."
  if modified_marker in current_scheme:
    if regenerate:
      new_scheme = current_scheme
    else:
      return # this view already has a fixed scheme and we aren't regenerating, so exit
  else:
    new_scheme =  "Packages/"+current_directory()+"/"+current_scheme.split("/")[-1].split(".")[0]+\
                  modified_marker + current_scheme.split(".")[-1]

  if fix_custom:
    for custom_filename in custom_files:
      if fix_scheme_in_settings(custom_filename, current_scheme, new_scheme):
        return
  if fix_syntax or ignore_flags:
    syntax_filename = view.settings().get('syntax').split('/')[-1].split('.')[0] + ".sublime-settings"
    if fix_scheme_in_settings(syntax_filename, current_scheme, new_scheme):
      return
  if fix_global or ignore_flags:
    if fix_scheme_in_settings("Preferences.sublime-settings", current_scheme, new_scheme):
      return
  print("Could not find or access the settings file where current color_scheme ("+current_scheme+") is set.")
dataset/ETHPy150Open ggordan/GutterColor/gutter_color.py/fix_scheme_in_view/swapped operands of `in`