Bump Ruff to 0.8.0, ignoring RUF022/RUF023 (#13090)

This commit is contained in:
Avasam
2024-11-25 13:27:01 -05:00
committed by GitHub
parent 0521fce9f9
commit 69e3eb8be6
3 changed files with 6 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ repos:
args: [--fix=lf]
- id: check-case-conflict
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1 # must match requirements-tests.txt
rev: v0.8.0 # must match requirements-tests.txt
hooks:
- id: ruff
name: Run ruff on stubs, tests and scripts

View File

@@ -71,6 +71,10 @@ extend-safe-fixes = [
"UP036", # Remove unnecessary `sys.version_info` blocks
]
ignore = [
# TODO: Ruff 0.8.0 added sorting of __all__ and __slots_. Validate whether we want this in stubs
"RUF022",
"RUF023",
###
# Rules that can conflict with the formatter (Black)
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
@@ -100,7 +104,6 @@ ignore = [
# B033 could be slightly useful but Ruff doesn't have per-file select
"B", # flake8-bugbear
# Rules that are out of the control of stub authors:
"E741", # ambiguous variable name
"F403", # `from . import *` used; unable to detect undefined names
# Stubs can sometimes re-export entire modules.
# Issues with using a star-imported name will be caught by type-checkers.

View File

@@ -13,7 +13,7 @@ packaging==24.1
pathspec>=0.11.1
pre-commit
# Required by create_baseline_stubs.py. Must match .pre-commit-config.yaml.
ruff==0.7.1
ruff==0.8.0
stubdefaulter==0.1.0
termcolor>=2.3
tomli==2.0.2