Skip to content

Commit

Permalink
Shrink 'any-generics' whitelist for the cmd module (#10847)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades committed Sep 27, 2022
1 parent 061c8ad commit 05683f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -188,7 +188,7 @@ strict_optional = false
module = [
"sphinx.application",
"sphinx.builders.*",
"sphinx.cmd.*",
"sphinx.cmd.quickstart",
"sphinx.config",
"sphinx.deprecation",
"sphinx.domains.*",
Expand Down
4 changes: 2 additions & 2 deletions sphinx/cmd/build.py
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sphinx/cmd/quickstart.py
Expand Up @@ -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)
Expand Down

0 comments on commit 05683f7

Please sign in to comment.