Add pre-commit scripts for file formatting

This commit is contained in:
Aaron Franke
2024-10-27 18:34:06 -07:00
parent 156aa63183
commit eff4d44f06
6 changed files with 153 additions and 1 deletions

21
pyproject.toml Normal file
View File

@@ -0,0 +1,21 @@
[tool.ruff]
line-length = 160
[tool.ruff.format]
indent-style = "tab"
[tool.ruff.lint]
ignore = [
"E401", # Allow multiple imports on one line.
"E402", # Module level import not at top of file (invalid for warehouse because we need gi.require_version above some imports).
"E713", # Test for membership does not have to be "not in".
"E714", # Test for object identity does not have to be "is not".
"F401", # Don't delete unused imports.
"F821", # Undefined name (underscore for translations).
]
[tool.codespell]
skip = """\
CODE_OF_CONDUCT.md,
*.po
"""