Skip to content

Commit

Permalink
Fix docs warnings (#1514)
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra authored Nov 27, 2023
1 parent 13ecfc7 commit 3f13960
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Linters and Formatters
stubs.

Type-Hint and Stub Integration
----------------------
------------------------------

* `autotyping <https://github.com/JelleZijlstra/autotyping>`_, a tool which infers simple types from their context and inserts them as inline type-hints.
* `merge_pyi <https://google.github.io/pytype/developers/tools.html#merge_pyi>`_, integrates .pyi signatures as inline type-hints in Python source code.
Expand Down
4 changes: 1 addition & 3 deletions docs/source/generics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ or a deserialization method returns the actual type of self. Therefore
you may need to silence the type checker inside these methods (but not at the call site),
possibly by making use of the ``Any`` type or a ``# type: ignore`` comment.

For some advanced uses of self types, see :ref:`additional examples <advanced_self>`.

Automatic self types using typing.Self
**************************************

Expand Down Expand Up @@ -641,7 +639,7 @@ Here's how one could annotate the decorator:
This still has some shortcomings. First, we need to use the unsafe
:py:func:`~typing.cast` to convince type checkers that ``wrapper()`` has the same
signature as ``func``. See :ref:`casts <casts>`.
signature as ``func``.

Second, the ``wrapper()`` function is not tightly type checked, although
wrapper functions are typically small enough that this is not a big
Expand Down
3 changes: 1 addition & 2 deletions docs/source/protocols.rst
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,7 @@ See also :py:class:`~typing.SupportsRound`.
Async protocols
...............

These protocols can be useful in async code. See :ref:`async-and-await`
for more information.
These protocols can be useful in async code.

Awaitable[T]
------------
Expand Down

0 comments on commit 3f13960

Please sign in to comment.