Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs warnings #1514

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading