Skip to content

Commit e9b6855

Browse files
ddfishergvanrossum
authored andcommitted
Bring back --hide-error-context flag (#2548)
Fixes #2545.
1 parent 7ceacc8 commit e9b6855

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

mypy/main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ def process_options(args: List[str],
222222
# which will make the cache writing process output pretty-printed JSON (which
223223
# is easier to debug).
224224
parser.add_argument('--debug-cache', action='store_true', help=argparse.SUPPRESS)
225+
parser.add_argument('--hide-error-context', action='store_true',
226+
dest='hide_error_context',
227+
help=argparse.SUPPRESS)
225228
# deprecated options
226229
parser.add_argument('-f', '--dirty-stubs', action='store_true',
227230
dest='special-opts:dirty_stubs',

mypy/options.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ def __init__(self) -> None:
7373
# Apply strict None checking
7474
self.strict_optional = False
7575

76+
# Hide "note: In function "foo":" messages.
77+
self.hide_error_context = True
78+
7679
# Files in which to allow strict-Optional related errors
7780
# TODO: Kill this in favor of show_none_errors
7881
self.strict_optional_whitelist = None # type: Optional[List[str]]
@@ -111,7 +114,6 @@ def __init__(self) -> None:
111114
self.incremental = False
112115
self.cache_dir = defaults.CACHE_DIR
113116
self.debug_cache = False
114-
self.hide_error_context = True # Hide "note: In function "foo":" messages.
115117
self.shadow_file = None # type: Optional[Tuple[str, str]]
116118
self.show_column_numbers = False # type: bool
117119

0 commit comments

Comments
 (0)