Skip to content

Commit

Permalink
minor modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
arbimaq committed Jun 25, 2024
1 parent 3b8c963 commit bcd7183
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion edx_repo_tools/unused_dependencies/gather_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def gather_imports( path, imports = set()):
files = [f for f in content if isfile(join(path, f))]
for file in files:
if file.endswith('.py'):
imports.update(manually_parse_imports(join(path, file)))
imports.update(parse_imports(join(path, file)))

dirs = {d for d in content if isdir(join(path, d))}
for dir in dirs - blacklist:
Expand Down
7 changes: 4 additions & 3 deletions edx_repo_tools/unused_dependencies/unused_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def unused_dependencies(path):
requirements = populate_requirements(join(path, 'requirements'))
imports = gather_imports(path)

print(requirements)
print(imports)
# print(requirements)
# print(imports)
unused = (requirements - imports) - whitelist
assert len(unused) == 0, "The following packages are unused: {}".format(unused)
print(unused)
# assert len(unused) == 0, "The following packages are unused: {}".format(unused)

0 comments on commit bcd7183

Please sign in to comment.