mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Shrink mypy whitelist for `sphinx.cmd.quickstart` (#12617)
Co-authored-by: Daniel Eades <daniel.eades@seebyte.com>
This commit is contained in:
@@ -244,7 +244,6 @@ strict_optional = false
|
|||||||
[[tool.mypy.overrides]]
|
[[tool.mypy.overrides]]
|
||||||
module = [
|
module = [
|
||||||
"sphinx.application",
|
"sphinx.application",
|
||||||
"sphinx.cmd.quickstart",
|
|
||||||
"sphinx.config",
|
"sphinx.config",
|
||||||
"sphinx.domains",
|
"sphinx.domains",
|
||||||
"sphinx.domains.c",
|
"sphinx.domains.c",
|
||||||
|
|||||||
@@ -326,7 +326,10 @@ def ask_user(d: dict[str, Any]) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def generate(
|
def generate(
|
||||||
d: dict, overwrite: bool = True, silent: bool = False, templatedir: str | None = None,
|
d: dict[str, Any],
|
||||||
|
overwrite: bool = True,
|
||||||
|
silent: bool = False,
|
||||||
|
templatedir: str | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Generate project based on values in *d*."""
|
"""Generate project based on values in *d*."""
|
||||||
template = QuickstartRenderer(templatedir or '')
|
template = QuickstartRenderer(templatedir or '')
|
||||||
@@ -423,7 +426,7 @@ def generate(
|
|||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
def valid_dir(d: dict) -> bool:
|
def valid_dir(d: dict[str, Any]) -> bool:
|
||||||
dir = d['path']
|
dir = d['path']
|
||||||
if not path.exists(dir):
|
if not path.exists(dir):
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user