From 49f7a5868331531e62aafe720779f97945f01989 Mon Sep 17 00:00:00 2001 From: Fokko Driesprong Date: Tue, 26 Sep 2023 11:47:58 +0200 Subject: [PATCH] Python: Add more Ruff rules --- python/pyproject.toml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index fe295371a245..5090e29cbb10 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -293,10 +293,15 @@ source = ['pyiceberg/'] [tool.ruff] src = ['pyiceberg','tests'] extend-exclude = ["dev/provision.py"] -# Enable the pycodestyle (`E`) and Pyflakes (`F`) rules by default. -# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or -# McCabe complexity (`C901`) by default. -select = ["E", "F", "W", "I", "UP"] +select = [ + "E", # pycodestyle + "W", # pycodestyle + "F", # Pyflakes + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "I", # isort + "UP", # pyupgrade +] ignore = ["E501","E203","B024","B028"] # Allow autofix for all enabled rules (when `--fix`) is provided.