pyi matching
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
from .loader import GriffeLoader
|
from .loader import GriffeLoader, discover_module_paths
|
||||||
from .renderers import MkDocsRenderer
|
from .renderers import MkDocsRenderer
|
||||||
from .cli import main
|
from .cli import main
|
||||||
from . import model
|
from . import model
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"GriffeLoader",
|
"GriffeLoader",
|
||||||
|
"discover_module_paths",
|
||||||
"MkDocsRenderer",
|
"MkDocsRenderer",
|
||||||
"model",
|
"model",
|
||||||
"main",
|
"main",
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ def tree(
|
|||||||
|
|
||||||
@cli.command()
|
@cli.command()
|
||||||
@click.option(
|
@click.option(
|
||||||
"--modules",
|
"--module",
|
||||||
multiple=True,
|
|
||||||
help="Python module import paths to document",
|
help="Python module import paths to document",
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
@@ -42,7 +41,7 @@ def tree(
|
|||||||
default=Path("docs"),
|
default=Path("docs"),
|
||||||
)
|
)
|
||||||
def generate(
|
def generate(
|
||||||
modules: Sequence[str],
|
module: str,
|
||||||
project_name: str | None,
|
project_name: str | None,
|
||||||
docs_dir: Path,
|
docs_dir: Path,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class MkDocsNavEmitter:
|
|||||||
"""
|
"""
|
||||||
...
|
...
|
||||||
|
|
||||||
def _to_relative(self, path: Path) -> str:
|
def _to_relative(self, path: Path, docs_root: Path | None) -> str:
|
||||||
"""
|
"""
|
||||||
Convert a filesystem path to a docs-relative path.
|
Convert a filesystem path to a docs-relative path.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -15,15 +15,14 @@ class ResolvedNav:
|
|||||||
|
|
||||||
home: Optional[str]
|
home: Optional[str]
|
||||||
groups: Dict[str, List[Path]]
|
groups: Dict[str, List[Path]]
|
||||||
|
_docs_root: Optional[Path]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
home: str | None,
|
home: str | None,
|
||||||
groups: Dict[str, List[Path]],
|
groups: Dict[str, List[Path]],
|
||||||
docs_root: Path | None = None,
|
docs_root: Path | None = ...,
|
||||||
) -> None:
|
) -> None: ...
|
||||||
self._docs_root = None
|
|
||||||
...
|
|
||||||
|
|
||||||
def all_files(self) -> Iterable[Path]:
|
def all_files(self) -> Iterable[Path]:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user