Skip to content

Commit

Permalink
Use the right types in {Dummy,Fake}Application
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Nov 24, 2024
1 parent b6b01c2 commit d178a53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions sphinx/ext/autosummary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import re
import sys
from inspect import Parameter
from pathlib import Path
from types import ModuleType
from typing import TYPE_CHECKING, Any, ClassVar, cast

Expand Down Expand Up @@ -154,10 +155,10 @@ class FakeApplication:
verbosity = 0

def __init__(self) -> None:
self.doctreedir = None
self.doctreedir = Path()
self.events = None
self.extensions: dict[str, Extension] = {}
self.srcdir = None
self.srcdir = Path()
self.config = Config()
self.project = Project('', {})
self.registry = SphinxComponentRegistry()
Expand Down
3 changes: 2 additions & 1 deletion sphinx/ext/autosummary/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from sphinx.pycode import ModuleAnalyzer
from sphinx.registry import SphinxComponentRegistry
from sphinx.util import logging, rst
from sphinx.util._pathlib import _StrPath
from sphinx.util.inspect import getall, safe_getattr
from sphinx.util.osutil import ensuredir
from sphinx.util.template import SphinxTemplateLoader
Expand All @@ -67,7 +68,7 @@ def __init__(self, translator: NullTranslations) -> None:
self.config = Config()
self.registry = SphinxComponentRegistry()
self.messagelog: list[str] = []
self.srcdir = '/'
self.srcdir = _StrPath('/')
self.translator = translator
self.verbosity = 0
self._warncount = 0
Expand Down

0 comments on commit d178a53

Please sign in to comment.