Skip to content

Commit

Permalink
let's see what's happening
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed May 20, 2019
1 parent e6b2f64 commit 2dce835
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 []


Expand Down
2 changes: 1 addition & 1 deletion pipenv/vendor/pipreqs/pipreqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2dce835

Please sign in to comment.