Skip to content

Commit d05d591

Browse files
committed
docs: reorder incomplete features list alphabetically in command_line.rst
The --enable-incomplete-feature flag uses sorted(INCOMPLETE_FEATURES) in mypy/main.py, so --help displays features alphabetically: InlineTypedDict, PreciseTupleTypes, TypeForm. The documentation listed them in a different order (PreciseTupleTypes, InlineTypedDict, TypeForm). Reorder the option metavar and the feature descriptions to match the alphabetical order shown by --help. Fixes #20171
1 parent ac07166 commit d05d591

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

docs/source/command_line.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ format into the specified directory.
11751175
Enabling incomplete/experimental features
11761176
*****************************************
11771177

1178-
.. option:: --enable-incomplete-feature {PreciseTupleTypes,InlineTypedDict,TypeForm}
1178+
.. option:: --enable-incomplete-feature {InlineTypedDict,PreciseTupleTypes,TypeForm}
11791179

11801180
Some features may require several mypy releases to implement, for example
11811181
due to their complexity, potential for backwards incompatibility, or
@@ -1187,6 +1187,14 @@ Enabling incomplete/experimental features
11871187

11881188
List of currently incomplete/experimental features:
11891189

1190+
* ``InlineTypedDict``: this feature enables non-standard syntax for inline
1191+
:ref:`TypedDicts <typeddict>`, for example:
1192+
1193+
.. code-block:: python
1194+
1195+
def test_values() -> {"width": int, "description": str}:
1196+
return {"width": 42, "description": "test"}
1197+
11901198
* ``PreciseTupleTypes``: this feature will infer more precise tuple types in
11911199
various scenarios. Before variadic types were added to the Python type system
11921200
by :pep:`646`, it was impossible to express a type like "a tuple with
@@ -1222,14 +1230,6 @@ List of currently incomplete/experimental features:
12221230
# Without PreciseTupleTypes: tuple[int, ...]
12231231
# With PreciseTupleTypes: tuple[()] | tuple[int] | tuple[int, int]
12241232
1225-
* ``InlineTypedDict``: this feature enables non-standard syntax for inline
1226-
:ref:`TypedDicts <typeddict>`, for example:
1227-
1228-
.. code-block:: python
1229-
1230-
def test_values() -> {"width": int, "description": str}:
1231-
return {"width": 42, "description": "test"}
1232-
12331233
* ``TypeForm``: this feature enables ``TypeForm``, as described in
12341234
`PEP 747 – Annotating Type Forms <https://peps.python.org/pep-0747/>_`.
12351235

0 commit comments

Comments
 (0)