Skip to content

Commit

Permalink
ci: tidy up ruff section of pyproject.toml
Browse files Browse the repository at this point in the history
- removed `SIM` rules from `extend-safe-fixes`, only 1 required it and manual fixes should be fine for new code
- Provided links for new config groups/settings

#3431 (comment)
  • Loading branch information
dangotbanned committed Jun 10, 2024
1 parent 4b38b87 commit 25ce09b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -173,25 +173,28 @@ exclude = [
]

[tool.ruff.lint]
# https://docs.astral.sh/ruff/preview/
preview = true

# https://docs.astral.sh/ruff/settings/#lint_extend-safe-fixes
extend-safe-fixes=[
"SIM101",
"SIM102",
"SIM103",
"SIM117",
# unnecessary-comprehension-in-call
"C419",
# literal-membership
"PLR6201",
# from __future__ import annotations
# from __future__ import annotations #
# ---------------------------------- #
"UP006",
"UP007",
"UP008",
"TCH",
# assign exception msg to variable first
# assign exception msg to variable #
# -------------------------------- #
"EM101",
"EM102",
]

# https://docs.astral.sh/ruff/preview/#using-rules-that-are-in-preview
extend-select=[
# refurb
"FURB",
Expand Down Expand Up @@ -280,6 +283,8 @@ ignore = [
# https://github.com/vega/altair/pull/3431#discussion_r1629808660
"SIM105",
]

# https://docs.astral.sh/ruff/settings/#lint_unfixable
unfixable= [
# unspecified-encoding
# The autofix is unsafe and doesn't reliably produce `utf-8`.
Expand Down Expand Up @@ -322,6 +327,7 @@ module = [
"schemapi.*"
]
ignore_missing_imports = true

[tool.pyright]
extraPaths=["./tools"]
pythonPlatform="All"
Expand Down

0 comments on commit 25ce09b

Please sign in to comment.