diff --git a/.flake8 b/.flake8 index db48ed9537529..615c18ee0a0e7 100644 --- a/.flake8 +++ b/.flake8 @@ -6,5 +6,7 @@ ignore = # the '=' sign in keyword arguments. Unfortunately, yapf inserts # them when there's a long argument (help text, for example). E251, - # Don't complain about line breaks after operators - W504 + # Don't complain about line breaks before or after operators. The + # recomendations on this have changed in 2016, so leave out the explicit + # checks: https://www.flake8rules.com/rules/W503.html + W503, W504 diff --git a/pyproject.toml b/pyproject.toml index e7776786f0d58..eb3733dab76b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,3 +90,12 @@ dependencies = [ [tool.setuptools] # This is actually not a python project, we just use pyproject.toml to manage dependencies. py-modules = [] + +[tool.ruff] +target-version = "py38" +line-length = 100 + +[tool.ruff.lint] +preview = true +explicit-preview-rules = true +select = ["ALL", "E303", "W391"]