From ee1be08bce527f801bfac012fab481c99a5631b2 Mon Sep 17 00:00:00 2001 From: Laurent FAINSIN Date: Fri, 26 May 2023 14:59:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20add=20pyproject.toml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..da6562a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,55 @@ +[tool.ruff] +line-length = 120 +ignore-init-module-imports = true +ignore = [ + "G004", # Logging statement uses f-string + "EM102", # Exception must not use an f-string literal, assign to variable first +] +select = [ + "A", # flake8-builtins + "B", # flake8-bugbear + "C90", # mccabe + "COM", # flake8-commas + "D", # pydocstyle + "EM", # flake8-errmsg + "E", # pycodestyle errors + "F", # Pyflakes + "G", # flake8-logging-format + "I", # isort + "N", # pep8-naming + "PIE", # flake8-pie + "PTH", # flake8-use-pathlib + "RET", # flake8-return + "RUF", # ruff + "S", # flake8-bandit + "TCH", # flake8-type-checking + "TID", # flake8-tidy-imports + "UP", # pyupgrade + "W", # pycodestyle warnings +] + +[tool.ruff.pydocstyle] +convention = "google" + +[tool.ruff.per-file-ignores] +"__init__.py" = ["F401"] + +[tool.black] +exclude = ''' +/( + \.git + \.venv +)/ +''' +include = '\.pyi?$' +line-length = 120 +target-version = ["py310"] + +[tool.isort] +multi_line_output = 3 +profile = "black" + +[tool.mypy] +python_version = "3.10" +warn_return_any = true +warn_unused_configs = true