Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python] add ruff linting support and exclude outdated flake8 rules #26264

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Loading