Update deps

This commit is contained in:
Sangye Ince-Johannsen 2025-01-17 22:01:57 +00:00
parent 410e7e0ea8
commit b18925b73c

9
deps
View file

@ -322,11 +322,17 @@ def subcmd_ls(args):
help='Recurse into subfolders.')
parser.add_argument('path', nargs='?', default='.',
help='File or directory to scan. Default is current directory.')
known_args, _ = parser.parse_known_args(args)
known_args, remaining_args = parser.parse_known_args(args)
path = known_args.path
recurse = known_args.recurse
# Ensure the path exists and handle imports accordingly
if not os.path.exists(path):
print(f"Error: Path does not exist: {path}")
return
# Call the import finder with the specified options
imports = find_imports_in_path(path, recurse=recurse)
if imports:
print("Imports found:")
@ -335,6 +341,7 @@ def subcmd_ls(args):
else:
print("No Python imports found (or none that require external packages).")
############################
# Main
############################