Skip to content

Commit e94fc3d

Browse files
committed
Avoid writing docs for extension module
1 parent cb11326 commit e94fc3d

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ test: ## run the tests (re-installs the package every time so you might want to
6868

6969
.PHONY: docs
7070
docs: ## build the docs
71-
uv run mkdocs build
71+
uv run --no-sync mkdocs build
7272

7373
.PHONY: docs-strict
7474
docs-strict: ## build the docs strictly (e.g. raise an error on warnings, this most closely mirrors what we do in the CI)
75-
uv run mkdocs build --strict
75+
uv run --no-sync mkdocs build --strict
7676

7777
.PHONY: docs-serve
7878
docs-serve: ## serve the docs locally
79-
uv run mkdocs serve
79+
uv run --no-sync mkdocs serve
8080

8181
.PHONY: changelog-draft
8282
changelog-draft: ## compile a draft of the next changelog

docs/gen_doc_stubs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def write_subpackage_pages(subpackage: object) -> tuple[PackageInfo, ...]:
4848
for _, name, is_pkg in pkgutil.walk_packages(subpackage.__path__):
4949
subpackage_full_name = subpackage.__name__ + "." + name
5050
sub_package_info = write_package_page(subpackage_full_name)
51+
if sub_package_info is None:
52+
continue
53+
5154
sub_sub_packages.append(sub_package_info)
5255

5356
return tuple(sub_sub_packages)
@@ -66,7 +69,7 @@ def get_write_file(package_full_name: str) -> Path:
6669

6770
def write_package_page(
6871
package_full_name: str,
69-
) -> PackageInfo:
72+
) -> PackageInfo | None:
7073
"""
7174
Write the docs pages for a package (or sub-package)
7275
"""
@@ -76,6 +79,8 @@ def write_package_page(
7679
write_subpackage_pages(package)
7780

7881
package_name = package_full_name.split(".")[-1]
82+
if package_name == "_lib":
83+
return None
7984

8085
write_file = get_write_file(package_full_name)
8186

0 commit comments

Comments
 (0)