# One answer for every editor, so that a diff shows what somebody meant to
# change and nothing else. Without this file the repository slowly acquires two
# indentation styles and every review has to look past them.
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

# Tabs are part of the syntax here, not a preference: a Makefile recipe indented
# with spaces fails with "missing separator", which reads like a broken target.
[Makefile]
indent_style = tab

[*.{py,pyi}]
indent_size = 4
# Matches `line-length = 100` in pyproject.toml. An editor that wraps at 79
# fights `ruff format` on every save.
max_line_length = 100

[*.{yml,yaml,json,jsonc,toml}]
indent_size = 2

[*.sh]
indent_size = 4

# Two trailing spaces are a hard line break in Markdown. Stripping them silently
# reflows the README.
[*.md]
trim_trailing_whitespace = false

# Generated by nbconvert/Jupyter — nothing here is hand-edited, and reindenting
# it produces a diff of the whole file.
[*.ipynb]
indent_size = 1
trim_trailing_whitespace = false

# The pins are written by scripts/lock.py, not by a person.
[constraints/*.txt]
indent_size = 4
