Skip to content

Commit 645f12f

Browse files
committed
Print InspectError traceback in walk_packages when verbose is specified
1 parent 9405bfd commit 645f12f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: mypy/stubutil.py

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os.path
66
import re
77
import sys
8+
import traceback
89
from abc import abstractmethod
910
from collections import defaultdict
1011
from contextlib import contextmanager
@@ -70,6 +71,9 @@ def walk_packages(
7071
try:
7172
prop = inspect.get_package_properties(package_name)
7273
except InspectError:
74+
if verbose:
75+
tb = traceback.format_exc()
76+
sys.stdout.write(tb)
7377
report_missing(package_name)
7478
continue
7579
yield prop.name

0 commit comments

Comments
 (0)