From 0c20fee4581f1e53f9cd694441092002f5b9fb8c Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Sun, 3 May 2026 12:34:33 +0800 Subject: [PATCH] build: add ty config and reorder tool sections in pyproject.toml Co-Authored-By: Claude --- pyproject.toml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dfa65155..a1f09178 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,16 +23,30 @@ dev = [ "watchdog==6.0.0", ] -[tool.pytest.ini_options] -testpaths = ["website/tests"] -pythonpath = ["website"] - -[tool.ruff] -line-length = 200 - [tool.uv] exclude-newer = "3 days" no-build = true [tool.uv.pip] only-binary = [":all:"] + +[tool.ruff] +line-length = 200 + +[tool.ty.environment] +python-version = "3.13" +root = ["website"] + +[tool.ty.terminal] +error-on-warning = true + +[tool.ty.rules] +division-by-zero = "error" +possibly-missing-attribute = "error" +possibly-missing-import = "error" +possibly-unresolved-reference = "error" +unused-ignore-comment = "error" + +[tool.pytest.ini_options] +testpaths = ["website/tests"] +pythonpath = ["website"]