Skip to content

Commit bf90775

Browse files
committed
Ignore __annotations__ warnings
1 parent 5eccc7a commit bf90775

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Doc/library/dataclasses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ Module contents
437437
By default, it is set to the module name of the caller.
438438

439439
This function is not strictly required, because any Python
440-
mechanism for creating a new class with :attr:`~object.__annotations__` can
440+
mechanism for creating a new class with :attr:`!__annotations__` can
441441
then apply the :deco:`dataclass` function to convert that class to
442442
a dataclass. This function is provided as a convenience. For
443443
example::

Doc/tutorial/controlflow.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ Function Annotations
10801080
information about the types used by user-defined functions (see :pep:`3107` and
10811081
:pep:`484` for more information).
10821082

1083-
:term:`Annotations <function annotation>` are stored in the :attr:`~object.__annotations__`
1083+
:term:`Annotations <function annotation>` are stored in the :attr:`!__annotations__`
10841084
attribute of the function as a dictionary and have no effect on any other part of the
10851085
function. Parameter annotations are defined by a colon after the parameter name, followed
10861086
by an expression evaluating to the value of the annotation. Return annotations are

0 commit comments

Comments
 (0)