From c19f735518bbb94138843b30d0152d17631589bc Mon Sep 17 00:00:00 2001 From: Amin Sadeghi Date: Fri, 9 Aug 2024 11:25:07 -0400 Subject: [PATCH] style: Config ruff to check imports by default except in init files --- ruff.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruff.toml b/ruff.toml index 939319d47..ab26a646f 100644 --- a/ruff.toml +++ b/ruff.toml @@ -40,6 +40,7 @@ target-version = "py310" # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or # McCabe complexity (`C901`) by default. select = ["E4", "E7", "E9", "F", "W"] +extend-select = ["I"] ignore = ["E731"] # Allow fix for all enabled rules (when `--fix`) is provided. @@ -77,5 +78,5 @@ docstring-code-format = true docstring-code-line-length = "dynamic" [lint.per-file-ignores] -"__init__.py" = ["E402", "F401", "F403"] +"__init__.py" = ["E402", "F401", "F403", "I001"] "test/**" = ["F841"]