mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
let's see what's happening
This commit is contained in:
@@ -243,12 +243,15 @@ def import_from_code(path="."):
|
||||
rs = []
|
||||
try:
|
||||
for r in pipreqs.get_all_imports(path, encoding="utf-8"):
|
||||
click.echo(r)
|
||||
if r not in BAD_PACKAGES:
|
||||
rs.append(r)
|
||||
pkg_names = pipreqs.get_pkg_names(rs)
|
||||
return [proper_case(r) for r in pkg_names]
|
||||
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return []
|
||||
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -68,7 +68,7 @@ def get_all_imports(path, encoding=None, extra_ignore_dirs=None):
|
||||
|
||||
candidates.append(os.path.basename(root))
|
||||
files = [fn for fn in files if os.path.splitext(fn)[1] == ".py"]
|
||||
|
||||
print(root, files)
|
||||
candidates += [os.path.splitext(fn)[0] for fn in files]
|
||||
for file_name in files:
|
||||
with open_func(os.path.join(root, file_name), "r", encoding=encoding) as f:
|
||||
|
||||
Reference in New Issue
Block a user