Skip to content

Commit

Permalink
Test autodoc_mock_imports
Browse files Browse the repository at this point in the history
  • Loading branch information
salt-die committed Jan 27, 2025
1 parent 6166ccc commit db5e1fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"sphinx.ext.autosummary",
"numpydoc",
]

autosummary_generate = True
autodoc_default_options = {
"members": True,
Expand All @@ -23,6 +22,7 @@
"inherited-members": True,
"ignore-module-all": True,
}
autodoc_mock_imports = ["_char_widths"]
html_theme = "pydata_sphinx_theme"
html_sidebars = {"**": ["search-field", "sidebar-nav-bs"]}
html_theme_options = {
Expand Down
9 changes: 1 addition & 8 deletions src/batgrl/text_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@
from numpy.typing import NDArray

from ._batgrl_markdown import find_md_tokens

try:
from ._char_widths import CHAR_WIDTHS # type: ignore
except ImportError:
# Doc generation will fail to import `_char_widths` because it hasn't been generated
# yet.
CHAR_WIDTHS = ()

from ._char_widths import CHAR_WIDTHS # type: ignore
from .colors import BLACK, WHITE, Color
from .geometry import Size

Expand Down

0 comments on commit db5e1fd

Please sign in to comment.