diff --git a/.ruff.toml b/.ruff.toml index bb1503095de..e8c94eba2c8 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -292,7 +292,7 @@ select = [ [lint.per-file-ignores] "doc/*" = [ "ANN", # documentation doesn't need annotations - "TCH001", # documentation doesn't need type-checking blocks + "TC001", # documentation doesn't need type-checking blocks ] "doc/conf.py" = ["INP001", "W605"] "doc/development/tutorials/examples/*" = ["INP001"] diff --git a/pyproject.toml b/pyproject.toml index e7adb48e64c..f479619fee4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,7 +82,7 @@ docs = [ ] lint = [ "flake8>=6.0", - "ruff==0.7.4", + "ruff==0.8.0", "mypy==1.13.0", "sphinx-lint>=0.9", "types-colorama==0.4.15.20240311", diff --git a/sphinx/_cli/util/colour.py b/sphinx/_cli/util/colour.py index bc1a610ba0e..dd01c56cd58 100644 --- a/sphinx/_cli/util/colour.py +++ b/sphinx/_cli/util/colour.py @@ -4,7 +4,7 @@ import os import sys -from collections.abc import Callable # NoQA: TCH003 +from collections.abc import Callable # NoQA: TC003 if sys.platform == 'win32': import colorama diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py index 4c92af67d9d..d92678ab8f2 100644 --- a/sphinx/directives/__init__.py +++ b/sphinx/directives/__init__.py @@ -9,11 +9,11 @@ from docutils.parsers.rst import directives, roles from sphinx import addnodes -from sphinx.addnodes import desc_signature # NoQA: TCH001 +from sphinx.addnodes import desc_signature # NoQA: TC001 from sphinx.util import docutils from sphinx.util.docfields import DocFieldTransformer, Field, TypedField from sphinx.util.docutils import SphinxDirective -from sphinx.util.typing import ExtensionMetadata, OptionSpec # NoQA: TCH001 +from sphinx.util.typing import ExtensionMetadata, OptionSpec # NoQA: TC001 if TYPE_CHECKING: from docutils.nodes import Node diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index 87823bd69fd..f8fa00f4316 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -4,7 +4,7 @@ import os import re -from collections.abc import Sequence # NoQA: TCH003 +from collections.abc import Sequence # NoQA: TC003 from contextlib import contextmanager from copy import copy from pathlib import Path @@ -14,7 +14,7 @@ from docutils import nodes from docutils.io import FileOutput from docutils.parsers.rst import Directive, directives, roles -from docutils.parsers.rst.states import Inliner # NoQA: TCH002 +from docutils.parsers.rst.states import Inliner # NoQA: TC002 from docutils.statemachine import State, StateMachine, StringList from docutils.utils import Reporter, unescape @@ -29,7 +29,7 @@ ) if TYPE_CHECKING: - from collections.abc import Callable, Iterator # NoQA: TCH003 + from collections.abc import Callable, Iterator # NoQA: TC003 from types import ModuleType, TracebackType from docutils.frontend import Values