Skip to content

Commit f4dbe5c

Browse files
committed
Rename directives.py to _directives.py
1 parent 03487d7 commit f4dbe5c

4 files changed

Lines changed: 3 additions & 35 deletions

File tree

great_docs/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,8 @@
1010

1111
from .cli import main
1212
from .core import GreatDocs
13-
from .directives import DocDirectives, extract_directives, has_directives, strip_directives
1413

1514
__all__ = [
1615
"GreatDocs",
1716
"main",
18-
"DocDirectives",
19-
"extract_directives",
20-
"strip_directives",
21-
"has_directives",
2217
]
Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
"""
2-
Docstring directive extraction and stripping for Great Docs.
3-
4-
This module provides functionality to extract Great Docs directives from
5-
docstrings (like @family:, @order:, @seealso:, @nodoc:) and strip them
6-
for clean rendering in documentation.
7-
8-
Directives use a simple single-line format with an @ prefix:
9-
10-
@directive: value
11-
12-
Example docstring with directives:
13-
14-
def my_function():
15-
'''
16-
Short description.
17-
18-
@family: Family Name
19-
@order: 1
20-
@seealso: other_func, AnotherClass
21-
22-
Parameters
23-
----------
24-
...
25-
'''
26-
"""
27-
281
from __future__ import annotations
292

303
import re

great_docs/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ def _extract_all_directives(self, package_name: str) -> dict:
13531353
Keys are either simple names (e.g., "MyClass") or qualified names
13541354
(e.g., "MyClass.my_method").
13551355
"""
1356-
from .directives import extract_directives
1356+
from ._directives import extract_directives
13571357

13581358
try:
13591359
import griffe
@@ -1470,7 +1470,7 @@ def _create_quartodoc_sections_from_families(self, package_name: str) -> list |
14701470
List of section dictionaries organized by family, or None if
14711471
no exports found.
14721472
"""
1473-
from .directives import DocDirectives
1473+
from ._directives import DocDirectives
14741474

14751475
exports = self._get_package_exports(package_name)
14761476
if not exports:

tests/test_directives.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from great_docs.directives import (
1+
from great_docs._directives import (
22
DocDirectives,
33
extract_directives,
44
has_directives,

0 commit comments

Comments
 (0)