8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39b4ef1 commit ed4aab7Copy full SHA for ed4aab7
mypy/__main__.py
@@ -1,9 +1,9 @@
1
"""Mypy type checker command line tool."""
2
-
3
-import sys
4
import os
+import sys
+import traceback
5
6
-from mypy.main import main
+from mypy.main import main, process_options
7
from mypy.util import FancyFormatter
8
9
@@ -19,6 +19,9 @@ def console_entry() -> None:
19
os.dup2(devnull, sys.stdout.fileno())
20
sys.exit(2)
21
except KeyboardInterrupt:
22
+ _, options = process_options(args=sys.argv[1:])
23
+ if options.show_traceback:
24
+ sys.stdout.write(traceback.format_exc())
25
formatter = FancyFormatter(sys.stdout, sys.stderr, False)
26
msg = " KeybordInterrupt called by user. Abort!\n"
27
sys.stdout.write(formatter.style(msg, color="red", bold=True))
0 commit comments