Context
With the new Great Docs documentation site and the package now shipping a py.typed marker, the type annotations and docs became a public contract. A thorough multi-agent accuracy review (types, docstrings, README, example apps, rendered site) confirmed 14 issues; 12 other candidate findings were investigated and refuted.
Confirmed and fixed (landing in the next commit)
Typing (py.typed contract)
Docstrings
README
Examples
Rendered docs site
Open follow-ups
Verification
pytest 17/17, ruff clean, griffe docstring parse clean, pyrefly 0 errors, docs site rebuilt with all post-process fix counts as expected.
Context
With the new Great Docs documentation site and the package now shipping a
py.typedmarker, the type annotations and docs became a public contract. A thorough multi-agent accuracy review (types, docstrings, README, example apps, rendered site) confirmed 14 issues; 12 other candidate findings were investigated and refuted.Confirmed and fixed (landing in the next commit)
Typing (
py.typedcontract)register_*functions missing-> None— consumers silently gotAnyfrom e.g.x = register_environment(env)Union[Markup, str]onrender_partialcollapses tostrunder mypy (Markup is a str subtype), making Markup-specific calls like.unescape()false errors — fixed with@overloads keyed onmarkup(Markupby default,strformarkup=False); mirrored ongenerate_render_partialDocstrings
enable_async=TruePartialsJinjaExtension:environmentparameter undocumented; added note that the extension path bypassesflask.render_template, so Flask context processors do not apply inside partials (verified by execution)README
video_image.htmlsnippet used' '.join(classes)but no caller passesclasses— crashes underStrictUndefined; nowclasses | default([])with corrected proseExamples
register_environmentinstead of the documentedregister_quart_extensionsrequirements.piptoolsomittedjinja_partials(andjinja2), so the examples couldn't run from their own requirements; lockfiles recompiled to 0.3.1Rendered docs site
Callable[…, Any]with a Unicode ellipsis, curly-quoted literals) — copied text was invalid PythonPartialsJinjaExtension()Open follow-ups
TestClienttwice) fails with "cannot schedule new futures after shutdown". Fix: create the executor inside the lifespan wrapper and shut it down in atry/finally, looking it up viaapp.statein the renderer.uvx ty check— 4 from the optional-importmodule = Nonepattern, 6 from jinja2's unannotatedEnvironment.globals(ty infers the value type fromDEFAULT_NAMESPACE), 1 unused-blanket-ignore warning on a comment pyrefly needs. Decide whether to suppress (checker-specific ignores) or leave. pyrefly reports 0 errors.Verification
pytest 17/17, ruff clean, griffe docstring parse clean, pyrefly 0 errors, docs site rebuilt with all post-process fix counts as expected.