From ce53ccefbab2275e7111bc63265608250cd8a8cb Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Fri, 13 Nov 2020 02:22:15 +0900 Subject: [PATCH] Fix #8398: Fix type annotation for "confdir" of Sphinx.__init__() None is allowed to the argument. So it should be "Optional[str]" instead of "str". --- sphinx/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/application.py b/sphinx/application.py index fb75c1851ea..5bdccdbb1bc 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -135,7 +135,7 @@ class Sphinx: :ivar outdir: Directory for storing build documents. """ - def __init__(self, srcdir: str, confdir: str, outdir: str, doctreedir: str, + def __init__(self, srcdir: str, confdir: Optional[str], outdir: str, doctreedir: str, buildername: str, confoverrides: Dict = None, status: IO = sys.stdout, warning: IO = sys.stderr, freshenv: bool = False, warningiserror: bool = False, tags: List[str] = None,