Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark --quick-and-dirty as deprecated. #5737

Merged
merged 2 commits into from Oct 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/source/command_line.rst
Expand Up @@ -436,7 +436,7 @@ beyond what incremental mode can offer, try running mypy in
.. _quick-mode:

``--quick-and-dirty``
This flag enables an experimental, unsafe variant of incremental mode.
This flag enables a **deprecated**, unsafe variant of incremental mode.
Quick mode is faster than regular incremental mode because it only
re-checks modules that were modified since their cache file was
last written: regular incremental mode also re-checks all modules
Expand All @@ -448,6 +448,7 @@ beyond what incremental mode can offer, try running mypy in

We recommend that you try using the :ref:`mypy_daemon` before
attempting to use this feature.
Quick mode is deprecated and will soon be removed.

.. _advanced-flags:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/config_file.rst
Expand Up @@ -367,7 +367,7 @@ section of the command line docs.
check and regenerate the cache if it was written by older versions of mypy.)

``quick_and_dirty`` (bool, default False)
Enables :ref:`quick mode <quick-mode>`.
Enables :ref:`quick mode <quick-mode>`. **Deprecated.**


Configuring error messages
Expand Down
13 changes: 8 additions & 5 deletions mypy/main.py
Expand Up @@ -574,9 +574,6 @@ def add_invertible_flag(flag: str,
incremental_group.add_argument(
'--cache-fine-grained', action='store_true',
help="Include fine-grained dependency information in the cache for the mypy daemon")
incremental_group.add_argument(
'--quick-and-dirty', action='store_true',
help="Use cache even if dependencies out of date (implies --incremental)")
incremental_group.add_argument(
'--skip-version-check', action='store_true',
help="Allow using cache written by older mypy version")
Expand Down Expand Up @@ -713,6 +710,8 @@ def add_invertible_flag(flag: str,
parser.add_argument('--no-fast-parser', action='store_true',
dest='special-opts:no_fast_parser',
help=argparse.SUPPRESS)
parser.add_argument('--quick-and-dirty', action='store_true',
help=argparse.SUPPRESS)

code_group = parser.add_argument_group(
title="Running code",
Expand Down Expand Up @@ -769,7 +768,8 @@ def add_invertible_flag(flag: str,
# Process deprecated options
if special_opts.disallow_any:
print("--disallow-any option was split up into multiple flags. "
"See http://mypy.readthedocs.io/en/latest/command_line.html#disallow-dynamic-typing")
"See http://mypy.readthedocs.io/en/latest/command_line.html#disallow-dynamic-typing",
file=sys.stderr)
if options.strict_boolean:
print("Warning: --strict-boolean is deprecated; "
"see https://github.com/python/mypy/issues/3195", file=sys.stderr)
Expand All @@ -792,7 +792,10 @@ def add_invertible_flag(flag: str,
print("Warning: --fast-parser is now the default (and only) parser.")
if special_opts.no_fast_parser:
print("Warning: --no-fast-parser no longer has any effect. The fast parser "
"is now mypy's default and only parser.")
"is now mypy's default and only parser.", file=sys.stderr)
if options.quick_and_dirty:
print("Warning: --quick-and-dirty is deprecated. It will disappear in the next release.",
file=sys.stderr)

try:
infer_python_version_and_executable(options, special_opts)
Expand Down