@@ -595,7 +595,7 @@ of the above sections.
595595 This flag causes mypy to suppress errors caused by not being able to fully
596596 infer the types of global and class variables.
597597
598- .. option :: --allow-redefinition-new
598+ .. option :: --allow-redefinition
599599
600600 By default, mypy won't allow a variable to be redefined with an
601601 unrelated type. This flag enables the redefinition of *unannotated *
@@ -613,7 +613,7 @@ of the above sections.
613613 # Type of "x" is "int | str" here.
614614 return x
615615
616- Without the new flag, mypy only supports inferring optional types
616+ Without this flag, mypy only supports inferring optional types
617617 (``X | None ``) from multiple assignments. With this option enabled,
618618 mypy can infer arbitrary union types.
619619
@@ -646,24 +646,21 @@ of the above sections.
646646 Note: We are planning to turn this flag on by default in a future mypy
647647 release.
648648
649- .. option :: --allow-redefinition
649+ .. option :: --allow-redefinition-new
650650
651- This is an alias to :option: `--allow-redefinition-old <mypy --allow-redefinition-old> `.
652- In mypy v2.0 this will point to
653- :option: `--allow-redefinition-new <mypy --allow-redefinition-new> `, and will
654- eventually became the default.
651+ Deprecated alias for :option: `--allow-redefinition <mypy --allow-redefinition> `.
655652
656653.. option :: --allow-redefinition-old
657654
658- This is an older variant of
659- :option: `--allow-redefinition-new <mypy --allow-redefinition-new > `.
655+ This is an older, more limited variant of
656+ :option: `--allow-redefinition <mypy --allow-redefinition> `.
660657 This flag enables redefinition of a variable with an
661658 arbitrary type *in some contexts *: only redefinitions within the
662659 same block and nesting depth as the original definition are allowed.
663660
664- We have no plans to remove this flag, but we expect that
665- :option: `--allow-redefinition-new <mypy --allow-redefinition-new > `
666- will replace this flag for new use cases eventually .
661+ We have no plans to remove this flag, but
662+ :option: `--allow-redefinition <mypy --allow-redefinition> `
663+ is recommended for new use cases.
667664
668665 Example where this can be useful:
669666
0 commit comments