Files
doc-forge/tests/introspection/test_functions_and_signatures.py
Vishesh 'ironeagle' Bangotra 06ffd2febd chore(release): 0.0.7
Squash-merge lib-standardisation: adopt repo standards across packaging,
tooling, docs, and CI.

- standardize pyproject.toml (canonical packaging, lint config, extras, GSDFC pydoclint)
- add py.typed marker, modernize type hints and Google-style docstrings
- nest generated docs under docs/lib and docs/mcp; add hand-written wiki
- adopt standard Type A PyPI CI pipeline (tag==version guard + quality gate)
- promote generated CHANGELOG.md; bump version to 0.0.7
2026-10-17 02:16:44 +05:30

19 lines
495 B
Python

from docforge import GriffeLoader
def test_function_signature(temp_package):
(temp_package / "fn.py").write_text('''def add(a: int, b: int = 1) -> int:
"""Adds numbers."""
return a + b
''')
loader = GriffeLoader()
project = loader.load_project(["testpkg.fn"])
module = project.get_module("testpkg.fn")
fn = module.get_object("add")
assert fn.kind == "function"
assert fn.signature is not None
assert "a" in fn.signature
assert "b" in fn.signature