mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Shrink 'any-generics' whitelist for the cmd
module (#10847)
This commit is contained in:
parent
061c8ad528
commit
05683f794c
@ -188,7 +188,7 @@ strict_optional = false
|
||||
module = [
|
||||
"sphinx.application",
|
||||
"sphinx.builders.*",
|
||||
"sphinx.cmd.*",
|
||||
"sphinx.cmd.quickstart",
|
||||
"sphinx.config",
|
||||
"sphinx.deprecation",
|
||||
"sphinx.domains.*",
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user