@@ -126,6 +126,8 @@ imports.
126
126
compliant packages. Adding this flag will disable this behavior.
127
127
128
128
129
+ .. _platform-configuration :
130
+
129
131
Platform configuration
130
132
**********************
131
133
@@ -169,12 +171,15 @@ For more information on how to use these flags, see :ref:`version_and_platform_c
169
171
compile-time constants that are always false. This flag may
170
172
be repeated.
171
173
172
- .. _disallow-any :
174
+ .. _disallow-dynamic-typing :
175
+
176
+ Disallow dynamic typing
177
+ ***********************
173
178
174
- Disallow Any
175
- ************
179
+ The ``Any `` type is used represent a value that has a :ref: `dynamic type <dynamic-typing >`.
180
+ The ``--disallow-any `` family of flags will disallow various uses of the ``Any `` type in
181
+ a module -- this lets us strategically disallow the use of dynamic typing in a controlled way.
176
182
177
- The ``--disallow-any `` family of flags disallows various types of ``Any `` in a module.
178
183
The following options are available:
179
184
180
185
``--disallow-any-unimported ``
@@ -208,8 +213,6 @@ The following options are available:
208
213
``dict ``) become disallowed as you should use their aliases from the typing
209
214
module (such as ``List[int] `` and ``Dict[str, str] ``).
210
215
211
- .. _disallow-subclassing-any :
212
-
213
216
``--disallow-subclassing-any ``
214
217
This flag reports an error whenever a class subclasses a value of
215
218
type ``Any ``. This may occur when the base class is imported from
@@ -239,8 +242,6 @@ definitions or calls.
239
242
This flag reports an error whenever it encounters a function definition
240
243
without type annotations.
241
244
242
- .. _disallow-incomplete-defs :
243
-
244
245
``--disallow-incomplete-defs ``
245
246
This flag reports an error whenever it encounters a partly annotated
246
247
function definition.
@@ -258,6 +259,7 @@ definitions or calls.
258
259
This flag reports an error whenever a function with type annotations
259
260
is decorated with a decorator without annotations.
260
261
262
+ .. _none-and-optional-handling :
261
263
262
264
None and Optional handling
263
265
**************************
@@ -299,6 +301,7 @@ For more details, see :ref:`no_strict_optional`.
299
301
mypy 0.600, and in previous versions it had to be explicitly enabled
300
302
using ``--strict-optional `` (which is still accepted).
301
303
304
+ .. _configuring-warnings :
302
305
303
306
Configuring warnings
304
307
********************
@@ -353,6 +356,8 @@ of the above sections.
353
356
Note: the exact list of flags enabled by running ``--strict `` may change
354
357
over time.
355
358
359
+ .. _configuring-error-messages :
360
+
356
361
Configuring error messages
357
362
**************************
358
363
@@ -440,6 +445,8 @@ beyond what incremental mode can offer, try running mypy in
440
445
We recommend that you try using the :ref: `mypy_daemon ` before
441
446
attempting to use this feature.
442
447
448
+ .. _advanced-flags :
449
+
443
450
Advanced flags
444
451
**************
445
452
@@ -465,6 +472,8 @@ in developing or debugging mypy internals.
465
472
submitting them upstream, but also allows you to use a forked version of
466
473
typeshed.
467
474
475
+ .. _warn-incomplete-stub :
476
+
468
477
``--warn-incomplete-stub ``
469
478
This flag modifies both the ``--disallow-untyped-defs `` and
470
479
``--disallow-incomplete-defs `` flags so they also report errors
0 commit comments