Shrink mypy whitelist for `sphinx.cmd.quickstart` (#12617)

Co-authored-by: Daniel Eades <daniel.eades@seebyte.com>
This commit is contained in:
danieleades 2024-07-20 20:05:48 +01:00 committed by GitHub
parent 46fc784758
commit 952bdbbac2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -244,7 +244,6 @@ strict_optional = false
[[tool.mypy.overrides]]
module = [
"sphinx.application",
"sphinx.cmd.quickstart",
"sphinx.config",
"sphinx.domains",
"sphinx.domains.c",

View File

@ -326,7 +326,10 @@ def ask_user(d: dict[str, Any]) -> None:
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:
"""Generate project based on values in *d*."""
template = QuickstartRenderer(templatedir or '')
@ -423,7 +426,7 @@ def generate(
print()
def valid_dir(d: dict) -> bool:
def valid_dir(d: dict[str, Any]) -> bool:
dir = d['path']
if not path.exists(dir):
return True