@@ -122,8 +122,8 @@ assume here is some 3rd party library you've installed and are importing. These
1221221. Selectively disallow untyped function definitions only within the ``mycode.foo ``
123123 package -- that is, only for function definitions defined in the
124124 ``mycode/foo `` directory.
125-
126- 2. Selectively *disable * the "function is returning any" warnings within
125+
126+ 2. Selectively *disable * the "function is returning any" warnings within
127127 ``mycode.bar `` only. This overrides the global default we set earlier.
128128
1291293. Suppress any error messages generated when your codebase tries importing the
@@ -155,22 +155,22 @@ Note: this section describes options that can be used both globally and per-modu
155155See below for a list of import discovery options that may be used
156156:ref: `only globally <config-file-import-discovery-global >`.
157157
158- ``ignore_missing_imports `` (bool, default False)
158+ ``ignore_missing_imports `` (bool, default False)
159159 Suppresses error messages about imports that cannot be resolved.
160160
161161 If this option is used in a per-module section, the module name should
162162 match the name of the *imported * module, not the module containing the
163163 import statement.
164164
165- ``follow_imports `` (string, default ``normal ``)
165+ ``follow_imports `` (string, default ``normal ``)
166166 Directs what to do with imports when the imported module is found
167- as a ``.py `` file and not part of the files, modules and packages
167+ as a ``.py `` file and not part of the files, modules and packages
168168 provided on the command line.
169169
170170 The four possible values are ``normal ``, ``silent ``, ``skip `` and
171171 ``error ``. For explanations see the discussion for the
172- :ref: `--follow-imports <follow-imports >` command line flag.
173-
172+ :ref: `--follow-imports <follow-imports >` command line flag.
173+
174174 If this option is used in a per-module section, the module name should
175175 match the name of the *imported * module, not the module containing the
176176 import statement.
@@ -228,7 +228,7 @@ section of the command line docs.
228228 annotations.
229229
230230``disallow_incomplete_defs `` (bool, default False)
231- Disallows defining functions with incomplete type annotations.
231+ Disallows defining functions with incomplete type annotations.
232232
233233``check_untyped_defs `` (bool, default False)
234234 Type-checks the interior of functions without type annotations.
@@ -265,7 +265,7 @@ section of the command line docs.
265265``warn_unused_ignores `` (bool, default False)
266266 Warns about unneeded ``# type: ignore `` comments.
267267
268- ``warn_no_return `` (bool, default True)
268+ ``warn_no_return `` (bool, default True)
269269 Shows errors for missing return statements on some execution paths.
270270
271271``warn_return_any `` (bool, default False)
@@ -287,6 +287,12 @@ no analog available via the command line options.
287287``ignore_errors `` (bool, default False)
288288 Ignores all non-fatal errors.
289289
290+ Miscellaneous strictness flags
291+ ------------------------------
292+
293+ ``allow_redefinition `` (bool, default false)
294+ Allows variables to be redefined with an arbitrary type, as long as the redefinition
295+ is in the same block and nesting level as the original definition.
290296
291297Global-only options
292298*******************
@@ -302,7 +308,7 @@ For more information, see the :ref:`import discovery <import-discovery>`
302308section of the command line docs.
303309
304310Note: this section describes only global-only import discovery options. See above for
305- a list of import discovery options that may be used
311+ a list of import discovery options that may be used
306312:ref: `both per-module and globally <config-file-import-discovery-per-module >`.
307313
308314``namespace_packages `` (bool, default False)
@@ -330,7 +336,7 @@ Platform configuration
330336For more information, see the :ref: `platform configuration <platform-configuration >`
331337section of the command line docs.
332338
333- ``python_version `` (string)
339+ ``python_version `` (string)
334340 Specifies the Python version used to parse and check the target
335341 program. The string should be in the format ``DIGIT.DIGIT `` --
336342 for example ``2.7 ``. The default is the version of the Python
@@ -343,11 +349,11 @@ section of the command line docs.
343349 ``sys.platform `` variable.
344350
345351``always_true `` (comma-separated list of strings)
346- Specifies a list of variables that mypy will treat as
352+ Specifies a list of variables that mypy will treat as
347353 compile-time constants that are always true.
348-
349- ``always_false `` (comma-separated list of strings)
350- Specifies a list of variables that mypy will treat as
354+
355+ ``always_false `` (comma-separated list of strings)
356+ Specifies a list of variables that mypy will treat as
351357 compile-time constants that are always false.
352358
353359
@@ -357,10 +363,10 @@ Incremental mode
357363For more information, see the :ref: `incremental mode <incremental >`
358364section of the command line docs.
359365
360- ``incremental `` (bool, default True)
366+ ``incremental `` (bool, default True)
361367 Enables :ref: `incremental mode <incremental >`.
362368
363- ``cache_dir `` (string, default ``.mypy_cache ``)
369+ ``cache_dir `` (string, default ``.mypy_cache ``)
364370 Specifies the location where mypy stores incremental cache info.
365371 Note that the cache is only read when incremental mode is enabled
366372 but is always written to, unless the value is set to ``/dev/nul ``
@@ -378,7 +384,7 @@ Configuring error messages
378384For more information, see the :ref: `configuring error messages <configuring-error-messages >`
379385section of the command line docs.
380386
381- ``show_error_context `` (bool, default False)
387+ ``show_error_context `` (bool, default False)
382388 Prefixes each error with the relevant context.
383389
384390``show_column_numbers `` (bool, default False)
@@ -397,7 +403,7 @@ section of the command line docs.
397403``show_traceback `` (bool, default False)
398404 Shows traceback on fatal error.
399405
400- ``custom_typing_module `` (string)
406+ ``custom_typing_module `` (string)
401407 Specifies a custom module to use as a substitute for the ``typing `` module.
402408
403409``custom_typeshed_dir `` (string)
@@ -425,5 +431,3 @@ Miscellaneous
425431
426432``verbosity `` (integer, default 0)
427433 Controls how much debug output will be generated. Higher numbers are more verbose.
428-
429-
0 commit comments