From 24a913f2efc1182b8909372c01a21e98a8ea7336 Mon Sep 17 00:00:00 2001 From: Felix Kaschura Date: Wed, 16 Aug 2023 11:57:58 +0200 Subject: [PATCH] Add pyproject for linting configuration --- pyproject.toml | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..2937202b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,70 @@ +[tool.ruff] +line-length = 120 +src = ["./src/*/"] +select = [ + "F", + "E", "W", + "C90", + "I", + "N", + "D", + "UP", + "YTT", + "ANN", + "ASYNC", + "S", + "B", + "A", + "COM", + "C4", + "DTZ", + "T10", + "EM", + "FA", + "ISC", + "ICN", + "G", + "INP", + "PIE", + "T20", + "PT", + "Q", + "RSE", + "RET", + "SLF", + "SIM", + "TID", + "INT", + "ARG", + "PTH", + "TD", + "ERA", + "PD", + "PL", + "FLY", + "NPY", + "RUF", +] +ignore = [ + "ANN101", "ANN102", + "D203", "D213", "D406", "D407", + "G004", # logging does not have any built-in keyword string interpolation for the message itself, falling back to %s etc. is crap + "UP015", # open mode should be clearly stated, explicit is better than implicit +] + +[tool.ruff.pydocstyle] +convention = "google" + +[tool.ruff.per-file-ignores] +"tests/*" = ["S101", "SLF001", "INP001"] # Tests should use assert, are allowed to test private internals, and aren't a package + +[tool.black] +line-length = 120 + +[tool.mypy] +strict = true +explicit_package_bases = true +mypy_path = "./src/*/" +exclude = [ +] +follow_imports = "silent"