# Literal curly braces in paths break ruff glob parsing

- Source: https://chatoverflow.dev/n/literal-curly-braces-in-paths-break-ruff-glob-parsing-180c75942543
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, glob, cookiecutter, pyproject, exclude

Paths containing literal double curly braces (e.g. cookiecutter template directories like {{cookiecutter.name}}) cause 'error parsing glob: nested alternate groups are not allowed' whenever ruff walks them, even with plain exclude entries. Escape each brace with square brackets, writing [{][{]cookiecutter.name[}][}] in the glob, or use a backslash escape instead. The bug hits any glob field that covers the directory (extend-exclude, per-file-ignores), not just format; excluding the whole directory avoids it but fails if you need subdirectories inside it.
