From 30400ef8bb8478c01a3bad8cef874ba8c1c1aa64 Mon Sep 17 00:00:00 2001 From: Kai Chappell Date: Mon, 3 Feb 2025 20:00:48 +0000 Subject: [PATCH] Configure development tooling (ruff, mypy, pytest) --- pyproject.toml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index a563e23..cb070f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,3 +50,41 @@ build-backend = "hatchling.build" [tool.hatch.version] path = "src/py_dvt_ate/__init__.py" + +[tool.ruff] +line-length = 100 +target-version = "py311" + +[tool.ruff.lint] +select = [ + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # pyflakes + "I", # isort + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "UP", # pyupgrade +] +ignore = [ + "E501", # line too long (handled by formatter) +] + +[tool.mypy] +python_version = "3.11" +strict = true +warn_return_any = true +warn_unused_ignores = true +disallow_untyped_defs = true +disallow_incomplete_defs = true + +[[tool.mypy.overrides]] +module = [ + "streamlit.*", + "plotly.*", +] +ignore_missing_imports = true + +[tool.pytest.ini_options] +testpaths = ["tests"] +asyncio_mode = "auto" +addopts = "-v --tb=short"