diff --git a/pyproject.toml b/pyproject.toml index ad76508dfac..fa6bff5748a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -188,7 +188,7 @@ strict_optional = false module = [ "sphinx.application", "sphinx.builders.*", - "sphinx.cmd.*", + "sphinx.cmd.quickstart", "sphinx.config", "sphinx.deprecation", "sphinx.domains.*", diff --git a/sphinx/cmd/build.py b/sphinx/cmd/build.py index 6cadefe3bb9..cab282bd151 100644 --- a/sphinx/cmd/build.py +++ b/sphinx/cmd/build.py @@ -9,7 +9,7 @@ import sys import traceback from os import path -from typing import IO, Any, List, Optional, TextIO +from typing import Any, List, Optional, TextIO from docutils.utils import SystemMessage @@ -25,7 +25,7 @@ def handle_exception( - app: Optional[Sphinx], args: Any, exception: BaseException, stderr: IO = sys.stderr + app: Optional[Sphinx], args: Any, exception: BaseException, stderr: TextIO = sys.stderr ) -> None: if isinstance(exception, bdb.BdbQuit): return diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index 58f1a8d617d..f9b63ac0ac3 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -177,7 +177,7 @@ def _has_custom_template(self, template_name: str) -> bool: else: return False - def render(self, template_name: str, context: Dict) -> str: + def render(self, template_name: str, context: Dict[str, Any]) -> str: if self._has_custom_template(template_name): custom_template = path.join(self.templatedir, path.basename(template_name)) return self.render_from_file(custom_template, context)