Skip to content

Fix typo #11381

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

Merged
merged 3 commits into from
Oct 25, 2021
Merged

Fix typo #11381

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
6 changes: 3 additions & 3 deletions docs/source/type_inference_and_annotations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ You might want to disable type checking on specific lines, or within specific
files in your codebase. To do that, you can use a ``# type: ignore`` comment.

For example, say that the web framework that you use now takes an integer
argument to ``run()``, which starts it on localhost on that port. Liks so:
argument to ``run()``, which starts it on localhost on that port. Like so:

.. code-block:: python

# Starting app on http://localhost:8000
app.run(8000)

However, the type stubs that the package uses is not up-to-date, and it still
expects only `str` types for `run()`. This would give you the following error:
expects only ``str`` types for ``run()``. This would give you the following error:

.. code-block:: text

Expand Down Expand Up @@ -266,7 +266,7 @@ If your error displays an error code, like so:
error: "str" has no attribute "trim" [attr-defined]


It is possible to add a specific error-code in your message, like
It is possible to add a specific error-code in your ignore comment, like
``# type: ignore[attr-defined]``, to clarify what's being silenced. You can
find more information about error codes here: :ref:`silence-error-codes`.

Expand Down