Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion code_graph/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import logging
import validators
import subprocess
from git import Repo
from .info import *
from pathlib import Path
from .graph import Graph
Expand Down Expand Up @@ -61,6 +60,7 @@ def from_git_repository(cls, url: str):

@classmethod
def from_local_repository(cls, path: Path|str):
from git import Repo
path = Path(path) if isinstance(path, str) else path

# Validate path exists
Expand All @@ -77,6 +77,7 @@ def from_local_repository(cls, path: Path|str):
return cls(name, path, url)

def analyze_sources(self, ignore: Optional[List[str]] = []) -> Graph:
from git import Repo
analyzer = SourceAnalyzer()
analyzer.analyze(self.path, self.graph, ignore)

Expand Down