mirror of
https://github.com/godotengine/godot.git
synced 2026-05-06 07:56:56 -04:00
CI: Bump ruff hook (0.15.0 → 0.15.8)
• Adjust linter configuration to reuse legacy defaults
This commit is contained in:
@@ -46,7 +46,7 @@ repos:
|
||||
stages: [manual]
|
||||
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.15.0
|
||||
rev: v0.15.8
|
||||
hooks:
|
||||
- id: ruff-check
|
||||
args: [--color=always]
|
||||
|
||||
+14
-9
@@ -21,20 +21,25 @@ preview = true
|
||||
fix = true
|
||||
|
||||
[tool.ruff.lint]
|
||||
# NOTE: Starting with `0.15.2`, ruff uses a SIGNIFICANTLY expanded set of default rules for
|
||||
# preview builds. While expanding into these new rulesets is something we're interested in,
|
||||
# we'll adopt them gradually, depending on our needs. As such, our base `select` utilizes the
|
||||
# legacy defaults.
|
||||
select = ["E4", "E7", "E9", "F"]
|
||||
extend-select = [
|
||||
"I", # isort
|
||||
"UP006", # Use {to} instead of {from} for type annotation
|
||||
"UP007", # Use `X | Y` for type annotations
|
||||
"UP037", # Remove quotes from type annotation
|
||||
"FA", # Future annotations
|
||||
"FA", # flake8-future-annotations.
|
||||
"I", # isort.
|
||||
"UP006", # Use {to} instead of {from} for type annotation.
|
||||
"UP007", # Use `X | Y` for type annotations.
|
||||
"UP037", # Remove quotes from type annotation.
|
||||
]
|
||||
extend-safe-fixes = ["UP006", "UP007", "FA"]
|
||||
extend-safe-fixes = ["FA", "UP006", "UP007"]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"{SConstruct,SCsub}" = [
|
||||
"E402", # Module level import not at top of file
|
||||
"F403", # Undefined local with import star
|
||||
"F405", # Undefined local with import star usage
|
||||
"E402", # Module level import not at top of file.
|
||||
"F403", # Undefined local with import star.
|
||||
"F405", # Undefined local with import star usage.
|
||||
]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
|
||||
Reference in New Issue
Block a user