diff --git a/mypy.ini b/mypy.ini index 886b254744..eb98e38e4a 100644 --- a/mypy.ini +++ b/mypy.ini @@ -35,6 +35,8 @@ follow_imports = error # This doesn't get in the way of using the stubs we *do* have. ignore_missing_imports = True +# Warn of unreachable or redundant code. +warn_unreachable = True # # diff --git a/tools/run-mypy b/tools/run-mypy index 0a4f6f3708..1284e3f346 100755 --- a/tools/run-mypy +++ b/tools/run-mypy @@ -36,10 +36,6 @@ parser.add_argument('-a', '--all', action='store_true', help="check all files, bypassing the default exclude list") parser.add_argument('--force', action="store_true", help="run tests despite possible provisioning problems") -parser.add_argument('--warn-unreachable', - action='store_false', - default=True, - help="warn of unreachable or redundant code; defaults to true") args = parser.parse_args() assert_provisioning_status_ok(args.force) @@ -77,8 +73,6 @@ if not python_files and not pyi_files: extra_args = [] if args.quick: extra_args.append("--quick") -elif args.warn_unreachable: - extra_args.append("--warn-unreachable") mypy_args = extra_args + python_files + pyi_files if args.no_daemon: