Skip to content

Commit 5bb76d2

Browse files
authored
feat(imports): cache the extracted imports from a path (#391)
1 parent 53f0257 commit 5bb76d2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/polylith/imports/parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def parse_module(path: Path) -> ast.AST:
3838
return tree
3939

4040

41+
@lru_cache(maxsize=None)
4142
def extract_imports(path: Path) -> List[str]:
4243
tree = parse_module(path)
4344

0 commit comments

Comments
 (0)