@@ -292,22 +292,11 @@ Here are some more useful flags:
292
292
- ``--ignore-missing-imports `` suppresses error messages about imports
293
293
that cannot be resolved (see :ref: `follow-imports ` for some examples).
294
294
295
- - ``--strict-optional `` enables experimental strict checking of ``Optional[...] ``
296
- types and ``None `` values. Without this option, mypy doesn't generally check the
297
- use of ``None `` values -- they are valid everywhere. See :ref: `strict_optional ` for
298
- more about this feature.
299
-
300
- - ``--strict-optional-whitelist `` attempts to suppress strict Optional-related
301
- errors in non-whitelisted files. Takes an arbitrary number of globs as the
302
- whitelist. This option is intended to be used to incrementally roll out
303
- ``--strict-optional `` to a large codebase that already has mypy annotations.
304
- However, this flag comes with some significant caveats. It does not suppress
305
- all errors caused by turning on ``--strict-optional ``, only most of them, so
306
- there may still be a bit of upfront work to be done before it can be used in
307
- CI. It will also suppress some errors that would be caught in a
308
- non-strict-Optional run. Therefore, when using this flag, you should also
309
- re-check your code without ``--strict-optional `` to ensure new type errors
310
- are not introduced.
295
+ - ``--strict-optional `` enables strict checking of ``Optional[...] ``
296
+ types and ``None `` values. Without this option, mypy doesn't
297
+ generally check the use of ``None `` values -- they are valid
298
+ everywhere. See :ref: `strict_optional ` for more about this feature.
299
+ This flag will become the default in the near future.
311
300
312
301
- ``--disallow-untyped-defs `` reports an error whenever it encounters
313
302
a function definition without type annotations.
@@ -342,17 +331,19 @@ Here are some more useful flags:
342
331
343
332
.. _incremental :
344
333
345
- - ``--incremental `` is an experimental option that enables a module
346
- cache. When enabled, mypy caches results from previous runs
347
- to speed up type checking. Incremental mode can help when most parts
348
- of your program haven't changed since the previous mypy run. A
349
- companion flag is ``--cache-dir DIR ``, which specifies where the
350
- cache files are written. By default this is ``.mypy_cache `` in the
351
- current directory. While the cache is only read in incremental
352
- mode, it is written even in non-incremental mode, in order to "warm"
353
- the cache. To disable writing the cache, use
354
- ``--cache-dir=/dev/null `` (UNIX) or ``--cache-dir=nul `` (Windows).
355
- Cache files belonging to a different mypy version are ignored.
334
+ - ``--incremental `` enables a module cache, using results from
335
+ previous runs to speed up type checking. Incremental mode can help
336
+ when most parts of your program haven't changed since the previous
337
+ mypy run.
338
+
339
+ - ``--cache-dir DIR `` is a companion flag to ``-incremental ``, which
340
+ specifies where the cache files are written. By default this is
341
+ ``.mypy_cache `` in the current directory. While the cache is only
342
+ read in incremental mode, it is written even in non-incremental
343
+ mode, in order to "warm" the cache. To disable writing the cache,
344
+ use ``--cache-dir=/dev/null `` (UNIX) or ``--cache-dir=nul ``
345
+ (Windows). Cache files belonging to a different mypy version are
346
+ ignored.
356
347
357
348
.. _quick-mode :
358
349
0 commit comments