diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f310612c9..38971db73 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index b1d3f4b65..501066318 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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. diff --git a/requirements-tests.txt b/requirements-tests.txt index 77622c1fd..6a72f52f2 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -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