From 1d0ef191c632c498bfe8a68ea18d6e8e507f5bf3 Mon Sep 17 00:00:00 2001 From: Charlotte Gaskell Date: Tue, 23 Dec 2025 17:24:53 +0000 Subject: [PATCH] chore: add pre-commit and pyproject configs --- .pre-commit-config.yaml | 15 ++++++++++++ pyproject.toml | 51 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d6dd975 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-toml + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.12.2 + hooks: + - id: ruff-check + - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..abda1a4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,51 @@ +[project] +# This section contains metadata about your project. +# Don't forget to change the name, description, and authors to match your project! +name = "itpspapi" +description = "Server for ilo toki pi sitelen pona" +authors = [ + { name = "jan Kalote" } +] +version = "0.1.0" +readme = "README.md" +requires-python = ">=3.12" +dependencies = [ + "django~=6.0" +] + +[dependency-groups] +dev = [ + "pre-commit~=4.2.0", + "ruff~=0.12.2", +] + +[tool.ruff] +line-length = 119 +target-version = "py312" +fix = true + +[tool.ruff.lint] +select = ["ALL"] +ignore = [ + # Missing docstrings. + "D100", + "D104", + "D105", + "D106", + "D107", + # Docstring whitespace. + "D203", + "D213", + # Docstring punctuation. + "D415", + # Docstring quotes. + "D301", + # Builtins. + "A", + # Print statements. + "T20", + # TODOs. + "TD002", + "TD003", + "FIX", +]