File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -692,9 +692,8 @@ of the above sections.
692
692
.. option :: --extra-checks
693
693
694
694
This flag enables additional checks that are technically correct but may be
695
- impractical in real code. In particular, it prohibits partial overlap in
696
- ``TypedDict `` updates, and makes arguments prepended via ``Concatenate ``
697
- positional-only. For example:
695
+ impractical. In particular, it prohibits partial overlap in ``TypedDict `` updates,
696
+ and makes arguments prepended via ``Concatenate `` positional-only. For example:
698
697
699
698
.. code-block :: python
700
699
@@ -717,6 +716,13 @@ of the above sections.
717
716
bad: Bad = {" a" : 0 , " b" : " no" }
718
717
test(bad, bar)
719
718
719
+ In future more checks may be added to this flag if:
720
+
721
+ * The corresponding use cases are rare, thus not justifying a dedicated
722
+ strictness flag.
723
+
724
+ * The new check cannot be supported as an opt-in error code.
725
+
720
726
.. option :: --strict
721
727
722
728
This flag mode enables all optional error checking flags. You can see the
Original file line number Diff line number Diff line change @@ -748,7 +748,7 @@ section of the command line docs.
748
748
:type: boolean
749
749
:default: False
750
750
751
- This flag enables additional checks that are technically correct but may be impractical in real code .
751
+ This flag enables additional checks that are technically correct but may be impractical.
752
752
See :option: `mypy --extra-checks ` for more info.
753
753
754
754
.. confval :: implicit_reexport
@@ -771,13 +771,6 @@ section of the command line docs.
771
771
from foo import bar
772
772
__all__ = [' bar' ]
773
773
774
- .. confval :: strict_concatenate
775
-
776
- :type: boolean
777
- :default: False
778
-
779
- Make arguments prepended via ``Concatenate `` be truly positional-only.
780
-
781
774
.. confval :: strict_equality
782
775
783
776
:type: boolean
Original file line number Diff line number Diff line change @@ -199,9 +199,8 @@ The following config is equivalent to ``--strict`` (as of mypy 1.0):
199
199
warn_redundant_casts = True
200
200
warn_unused_ignores = True
201
201
202
- # Getting these passing should be easy
202
+ # Getting this passing should be easy
203
203
strict_equality = True
204
- strict_concatenate = True
205
204
206
205
# Strongly recommend enabling this one as soon as you can
207
206
check_untyped_defs = True
@@ -223,6 +222,10 @@ The following config is equivalent to ``--strict`` (as of mypy 1.0):
223
222
# This one can be tricky to get passing if you use a lot of untyped libraries
224
223
warn_return_any = True
225
224
225
+ # This one is a catch-all flag for the rest of strict checks that are technically
226
+ # correct but may not be practical
227
+ extra_checks = True
228
+
226
229
Note that you can also start with ``--strict `` and subtract, for instance:
227
230
228
231
.. code-block :: text
You can’t perform that action at this time.
0 commit comments