Skip to content

Commit d7f314a

Browse files
committed
perf: Don't store source when dumping as JSON
We never include the source into the JSON data.
1 parent d592edf commit d7f314a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/griffe/cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ def _load_packages(
6363
resolve_implicit: bool = False,
6464
resolve_external: bool = False,
6565
allow_inspection: bool = True,
66+
store_source: bool = True,
6667
) -> GriffeLoader:
6768
loader = GriffeLoader(
6869
extensions=extensions,
6970
search_paths=search_paths,
7071
docstring_parser=docstring_parser,
7172
docstring_options=docstring_options,
7273
allow_inspection=allow_inspection,
74+
store_source=store_source,
7375
)
7476
for package in packages:
7577
if not package:
@@ -328,6 +330,7 @@ def dump(
328330
resolve_implicit=resolve_implicit,
329331
resolve_external=resolve_external,
330332
allow_inspection=allow_inspection,
333+
store_source=False,
331334
)
332335
data_packages = loader.modules_collection.members
333336

0 commit comments

Comments
 (0)