mirror of
https://github.com/safishamsi/graphify.git
synced 2026-10-14 16:09:26 +00:00
The bug:
Jinja2 templates were completely skipped by Graphify's detection phase because their extensions were not listed in the recognized document extensions. This resulted in the source for generated files being hidden from the graph.
The fix:
Added `.j2`, `.jinja`, and `.jinja2` to the `DOC_EXTENSIONS` set in `graphify/detect.py`.
Tests:
`tests/test_detect_jinja.py` added to verify the newly added Jinja extensions are accurately recognized as documents. This ensures the bug does not regress in future updates.
(cherry picked from commit 61f6a40a56)
7 lines
200 B
Python
7 lines
200 B
Python
from graphify.detect import DOC_EXTENSIONS
|
|
|
|
def test_jinja2_extensions_are_documents():
|
|
assert '.j2' in DOC_EXTENSIONS
|
|
assert '.jinja' in DOC_EXTENSIONS
|
|
assert '.jinja2' in DOC_EXTENSIONS
|