Skip to content

Commit 624954f

Browse files
authored
Use Future[Any] instead of type[Any]
1 parent adefa07 commit 624954f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guides/writing_stubs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,8 +786,8 @@ When using :ref:`Any`, document the reason for using it in a comment, unless the
786786
reason is obvious. Ideally, document what types could be used. Obvious
787787
reasons can include:
788788

789-
* Using :ref:`Any` as a type argument for a generic to say "any object of this
790-
type is allowed", e.g. ``type[Any]``.
789+
* Using :ref:`Any` as a type argument for a generic with invariant type variables
790+
to say "any object of this type is allowed", e.g. ``Future[Any]``.
791791
* Using ``dict[str, Any]`` or ``Mapping[str, Any]`` when the value types
792792
depends on the keys. But consider using :ref:`TypedDict` or
793793
``dict[str, Incomplete]`` (temporarily) when the keys of the dictionary are

0 commit comments

Comments
 (0)