From b7d0441118e2c4478f6accd276f57389a2e3b16a Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 22 May 2024 16:37:54 +0200 Subject: [PATCH] Enable ruff/bugbear rules (B) by default For now, ignore these: - B007 - B019 - B026 - B028 - B904 --- pyproject.toml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 10215dfb2..019c53ec3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -149,7 +149,7 @@ line-length = 88 select = [ # fix noqas in fsspec/implementations/http.py "ASYNC", - # "B", enable in later PR + "B", "I", # isort "C4", "G", @@ -175,6 +175,17 @@ select = [ "SIM101", ] ignore = [ + # Loop control variable `loop` not used within loop body + "B007", + # Use of `functools.lru_cache` or `functools.cache` on methods can lead to memory leaks + "B019", + # Star-arg unpacking after a keyword argument is strongly discouraged + "B026", + # No explicit `stacklevel` keyword argument found + "B028", + # Within an `except` clause, raise exceptions with `raise ... from err` or + # `raise ... from None` to distinguish them from errors in exception handling + "B904", # Assigning lambda expression "E731", # Ambiguous variable names