Skip to content

Commit 971d088

Browse files
committed
mkdocs: Ignore the top-level conftest module
When generating documentation files from Python modules we now ignore the `conftest` module, as it is just a hack and not really source code for the project. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 1fe7591 commit 971d088

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/frequenz/repo/config/mkdocs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ def _is_internal(path_parts: Tuple[str, ...]) -> bool:
3535
def with_underscore_not_init(part: str) -> bool:
3636
return part.startswith("_") and part != "__init__"
3737

38-
return any(p for p in path_parts if with_underscore_not_init(p))
38+
is_conftest = len(path_parts) == 1 and path_parts[0] == "conftest"
39+
40+
return is_conftest or any(p for p in path_parts if with_underscore_not_init(p))
3941

4042

4143
def generate_python_api_pages(

0 commit comments

Comments
 (0)