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".
This commit is contained in:
Takeshi KOMIYA 2020-11-13 02:22:15 +09:00
parent 249778e7d0
commit ce53ccefba

View File

@ -135,7 +135,7 @@ class Sphinx:
:ivar outdir: Directory for storing build documents. :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, buildername: str, confoverrides: Dict = None,
status: IO = sys.stdout, warning: IO = sys.stderr, status: IO = sys.stdout, warning: IO = sys.stderr,
freshenv: bool = False, warningiserror: bool = False, tags: List[str] = None, freshenv: bool = False, warningiserror: bool = False, tags: List[str] = None,