added docs strings
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
2026-01-21 01:00:12 +05:30
parent 81e8a8cd49
commit b6e5114532
17 changed files with 563 additions and 25 deletions

View File

@@ -1,11 +1,46 @@
"""
This module defines the base interfaces and configuration containers for
doc-forge renderers. All renderer implementations should adhere to the
DocRenderer protocol.
"""
from pathlib import Path
from typing import Protocol
from docforge.model import Project
class RendererConfig:
"""Renderer configuration container."""
"""
Configuration container for documentation renderers.
Args:
out_dir: The directory where documentation files should be written.
project: The introspected project model to be rendered.
"""
def __init__(self, out_dir: Path, project: Project) -> None:
self.out_dir = out_dir
self.project = project
class DocRenderer(Protocol):
"""
Protocol defining the interface for documentation renderers.
"""
name: str
def generate_sources(
self,
project: Project,
out_dir: Path,
) -> None:
"""
Generate renderer-specific source files for the given project.
Args:
project: The project model containing modules and objects.
out_dir: Target directory for the generated files.
"""
...