Skip to content

Commit d01d2c9

Browse files
committed
chore: Add comment for a possible finder enhancement
1 parent 096970f commit d01d2c9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/griffe/finder.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
"""This module contains the code allowing to find modules."""
22

3+
# NOTE: it might be possible to replace a good part of this module's logic
4+
# with utilities from `importlib` (however the util in question is private):
5+
# >>> from importlib.util import _find_spec
6+
# >>> _find_spec("griffe.agents", _find_spec("griffe", None).submodule_search_locations)
7+
# ModuleSpec(
8+
# name='griffe.agents',
9+
# loader=<_frozen_importlib_external.SourceFileLoader object at 0x7fa5f34e8110>,
10+
# origin='/media/data/dev/griffe/src/griffe/agents/__init__.py',
11+
# submodule_search_locations=['/media/data/dev/griffe/src/griffe/agents'],
12+
# )
13+
314
from __future__ import annotations
415

516
import ast

0 commit comments

Comments
 (0)