Skip to content

Commit

Permalink
perf(core): only load local modules once (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkniewallner authored Dec 26, 2022
1 parent 8a71695 commit a2866fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deptry/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ def run(self) -> None:
exclude=self.exclude + self.extend_exclude, ignore_notebooks=self.ignore_notebooks
).get_all_python_files_in(Path("."))

local_modules = self._get_local_modules()

imported_modules = [
ModuleBuilder(
mod, self._get_local_modules(), dependencies_extract.dependencies, dependencies_extract.dev_dependencies
mod, local_modules, dependencies_extract.dependencies, dependencies_extract.dev_dependencies
).build()
for mod in get_imported_modules_for_list_of_files(all_python_files)
]
Expand Down

0 comments on commit a2866fe

Please sign in to comment.