diff options
author | danieleades <33452915+danieleades@users.noreply.github.com> | 2022-09-27 19:56:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-27 19:56:35 +0300 |
commit | 05683f794c81894b4e46bc0c85022afbb13ac541 (patch) | |
tree | 60cc33ba3b048463d8ececa0ddb4d575c976eeec | |
parent | 061c8ad528a823fe115231495ceb466b463a3a96 (diff) |
Shrink 'any-generics' whitelist for the `cmd` module (#10847)
-rw-r--r-- | pyproject.toml | 2 | ||||
-rw-r--r-- | sphinx/cmd/build.py | 4 | ||||
-rw-r--r-- | sphinx/cmd/quickstart.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/pyproject.toml b/pyproject.toml index ad76508df..fa6bff574 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 6cadefe3b..cab282bd1 100644 --- a/sphinx/cmd/build.py +++ b/sphinx/cmd/build.py @@ -9,7 +9,7 @@ import pdb 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 @@ from sphinx.util.osutil import abspath, ensuredir 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 58f1a8d61..f9b63ac0a 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -177,7 +177,7 @@ class QuickstartRenderer(SphinxRenderer): 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) |