From d494181127530c1af040d2e7d1e0851d5805943a Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Sat, 29 Oct 2022 20:33:27 -0400 Subject: [PATCH] ruff: Enable more errors. Signed-off-by: Anders Kaseorg --- pyproject.toml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index f16ff73768..1326416156 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,9 +99,26 @@ django_settings_module = "zproject.settings" [tool.ruff] # See https://github.com/charliermarsh/ruff#rules for error code definitions. +extend-select = [ + "B", # bugbear + "C", # comprehensions + "M", # meta + "U", # upgrade + "W", # style warnings +] ignore = [ + "B006", # Do not use mutable data structures for argument defaults + "B007", # Loop control variable not used within the loop body + "C408", # Unnecessary `dict` call (rewrite as a literal) "E402", # Module level import not at top of file "E501", # Line too long "E731", # Do not assign a lambda expression, use a def + + # Requires Python 3.9: + "U002", # `abspath(__file__)` is unnecessary in Python 3.9 and later + "U006", # Use `list` instead of `List` for type annotations + + # Requires Python 3.10: + "U007", # Use `X | Y` for type annotations ] line-length = 100