Skip to content

Commit

Permalink
perf: Don't store source when dumping as JSON
Browse files Browse the repository at this point in the history
We never include the source into the JSON data.
  • Loading branch information
pawamoy committed Jul 10, 2023
1 parent d592edf commit d7f314a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/griffe/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@ def _load_packages(
resolve_implicit: bool = False,
resolve_external: bool = False,
allow_inspection: bool = True,
store_source: bool = True,
) -> GriffeLoader:
loader = GriffeLoader(
extensions=extensions,
search_paths=search_paths,
docstring_parser=docstring_parser,
docstring_options=docstring_options,
allow_inspection=allow_inspection,
store_source=store_source,
)
for package in packages:
if not package:
Expand Down Expand Up @@ -328,6 +330,7 @@ def dump(
resolve_implicit=resolve_implicit,
resolve_external=resolve_external,
allow_inspection=allow_inspection,
store_source=False,
)
data_packages = loader.modules_collection.members

Expand Down

0 comments on commit d7f314a

Please sign in to comment.