name = "Python"
grammar = "python"
path_suffixes = ["py", "pyi", "mpy"]
first_line_pattern = '^#!.*\bpython[0-9.]*\b'
line_comments = ["# "]
autoclose_before = ";:.,=}])>"
brackets = [
    { start = "f\"", end = "\"", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "f'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "b\"", end = "\"", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "b'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "u\"", end = "\"", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "u'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "r\"", end = "\"", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "r'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "rb\"", end = "\"", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "rb'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "t\"", end = "\"", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "t'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
    { start = "\"\"\"", end = "\"\"\"", close = true, newline = false, not_in = ["string"] },
    { start = "'''", end = "'''", close = true, newline = false, not_in = ["string"] },
    { start = "{", end = "}", close = true, newline = true },
    { start = "[", end = "]", close = true, newline = true },
    { start = "(", end = ")", close = true, newline = true },
    { start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
    { start = "'", end = "'", close = true, newline = false, not_in = ["string"] },
]

auto_indent_using_last_non_empty_line = false
debuggers = ["Debugpy"]
increase_indent_pattern = "^[^#].*:\\s*(#.*)?$"
decrease_indent_patterns = [
  { pattern = "^\\s*elif\\b.*:\\s*(#.*)?",    valid_after = ["if", "elif"] },
  { pattern = "^\\s*else\\b.*:\\s*(#.*)?",    valid_after = ["if", "elif", "for", "while", "except"] },
  { pattern = "^\\s*except\\b.*:\\s*(#.*)?",  valid_after = ["try", "except"] },
  { pattern = "^\\s*finally\\b.*:\\s*(#.*)?", valid_after = ["try", "except", "else"] },
]
import_path_strip_regex = "/__init__\\.py$"
