From 5406acf83dfe70a3661a275bf9b1b214a632fa63 Mon Sep 17 00:00:00 2001 From: Adrian Rumpold Date: Wed, 27 Jul 2022 17:08:05 +0200 Subject: [PATCH] chore: Tool config --- .flake8 | 9 +++++++++ pyproject.toml | 14 +++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .flake8 diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..f595900 --- /dev/null +++ b/.flake8 @@ -0,0 +1,9 @@ +[flake8] +exclude = .git,__pycache__,.venv +ignore = E501, # line too long, rely on black for reformatting of these, since sometimes URLs or comments can be longer + W503, # Outdated: line break before binary operator, this is now considered best practice, see https://www.flake8rules.com/rules/W503.html + W504, # Line break occurred after a binary operator + F841, # Allow capitalized variable names, necessary for e.g., `X_train = get_train_data()` + E221, # Multiple spaces before operator + F401, # Module imported but unused - covered by Pylint + F811 # Redefinition of unused name from line n - covered by Pylint diff --git a/pyproject.toml b/pyproject.toml index ce8b8a9..b187fef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,8 @@ packages = [ [tool.poetry.dependencies] pandas = "^1.4.3" -python = "^3.10" pyarrow = "^8.0.0" +python = "^3.10" [tool.poetry.dev-dependencies] black = "^22.6.0" @@ -22,3 +22,15 @@ pytest = "^7.1.2" [build-system] build-backend = "poetry.core.masonry.api" requires = ["poetry-core>=1.0.0"] + +[tool.black] +# Source https://github.com/psf/black#configuration-format +include = "\\.pyi?$" +line-length = 88 +target-version = ["py39"] + +# Black-compatible settings for isort +# See https://black.readthedocs.io/en/stable/compatible_configs.html +[tool.isort] +line_length = "88" +profile = "black"