Skip to content

Commit e497d2d

Browse files
committed
remove verbatim titles
Signed-off-by: Oleg Höfling <[email protected]>
1 parent c3a29f2 commit e497d2d

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

docs/source/class_basics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ to it explicitly using ``self``:
7878
a = self
7979
a.x = 1 # Error: 'x' not defined
8080
81-
Annotating ``__init__`` methods
82-
*******************************
81+
Annotating __init__ methods
82+
***************************
8383

8484
The :py:meth:`__init__ <object.__init__>` method is somewhat special -- it doesn't return a
8585
value. This is best expressed as ``-> None``. However, since many feel

docs/source/error_code_list.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ Example:
415415
# Error: Dict entry 0 has incompatible type "str": "str"; expected "str": "int" [dict-item]
416416
d: Dict[str, int] = {'key': 'value'}
417417
418-
Check ``TypedDict`` items [typeddict-item]
419-
------------------------------------------
418+
Check TypedDict items [typeddict-item]
419+
--------------------------------------
420420

421421
When constructing a ``TypedDict`` object, mypy checks that each key and value is compatible
422422
with the ``TypedDict`` type that is inferred from the surrounding context.
@@ -568,8 +568,8 @@ Example:
568568
# Error: Cannot instantiate abstract class 'Thing' with abstract attribute 'save' [abstract]
569569
t = Thing()
570570
571-
Check the target of ``NewType`` [valid-newtype]
572-
-----------------------------------------------
571+
Check the target of NewType [valid-newtype]
572+
-------------------------------------------
573573

574574
The target of a :py:func:`NewType <typing.NewType>` definition must be a class type. It can't
575575
be a union type, ``Any``, or various other special types.
@@ -592,8 +592,8 @@ To work around the issue, you can either give mypy access to the sources
592592
for ``acme`` or create a stub file for the module. See :ref:`ignore-missing-imports`
593593
for more information.
594594

595-
Check the return type of ``__exit__`` [exit-return]
596-
---------------------------------------------------
595+
Check the return type of __exit__ [exit-return]
596+
-----------------------------------------------
597597

598598
If mypy can determine that :py:meth:`__exit__ <object.__exit__>` always returns ``False``, mypy
599599
checks that the return type is *not* ``bool``. The boolean value of

docs/source/error_code_list2.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ Example:
135135
...
136136
137137
138-
Check that function does not return ``Any`` value [no-any-return]
139-
-----------------------------------------------------------------
138+
Check that function does not return Any value [no-any-return]
139+
-------------------------------------------------------------
140140

141141
If you use ``--warn-return-any``, mypy generates an error if you return a
142142
value with an ``Any`` type in a function that is annotated to return a
@@ -155,8 +155,8 @@ Example:
155155
# Error: Returning Any from function declared to return "str" [no-any-return]
156156
return fields(x)[0]
157157
158-
Check that types have no ``Any`` components due to missing imports [no-any-unimported]
159-
--------------------------------------------------------------------------------------
158+
Check that types have no Any components due to missing imports [no-any-unimported]
159+
----------------------------------------------------------------------------------
160160

161161
If you use ``--disallow-any-unimported``, mypy generates an error if a component of
162162
a type becomes ``Any`` because mypy couldn't resolve an import. These "stealth"

docs/source/getting_started.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ Arguments with default values can be annotated like so:
160160
for key, value in kwargs:
161161
print(key, value)
162162
163-
The ``typing`` module
164-
*********************
163+
The typing module
164+
*****************
165165

166166
So far, we've added type hints that use only basic concrete types like
167167
``str`` and ``float``. What if we want to express more complex types,

docs/source/protocols.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ such as trees and linked lists:
376376
377377
root: TreeLike = SimpleTree(0) # OK
378378
379-
Using ``isinstance()`` with protocols
380-
*************************************
379+
Using isinstance() with protocols
380+
*********************************
381381
382382
You can use a protocol class with ``isinstance()`` if you decorate it
383383
with the ``@runtime_checkable`` class decorator. The decorator adds

0 commit comments

Comments
 (0)