Skip to content

Commit 61559ed

Browse files
Apply suggestions from code review
Accept suggestions Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent 0c7fefc commit 61559ed

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Doc/library/annotationlib.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,20 +346,20 @@ Functions
346346
does not exist either, :attr:`!object.__annotations__` is tried again and any error
347347
from accessing it is re-raised.
348348

349-
* When calling :attr:`!object.__annotate__` it is first called with :attr:`~Format.FORWARDREF`,
350-
if this is not implemented it will then check if :attr:`~Format.VALUE_WITH_FAKE_GLOBALS`
349+
* When calling :attr:`!object.__annotate__` it is first called with :attr:`~Format.FORWARDREF`.
350+
If this is not implemented, it will then check if :attr:`~Format.VALUE_WITH_FAKE_GLOBALS`
351351
is supported and use that in the fake globals environment.
352-
If neither of these formats are supported it will fall back to using :attr:`~Format.VALUE`.
352+
If neither of these formats are supported, it will fall back to using :attr:`~Format.VALUE`.
353353
If :attr:`~Format.VALUE` fails, the error from this call will be raised.
354354

355355
* STRING: If :attr:`!object.__annotate__` exists, it is called first;
356356
otherwise, :attr:`!object.__annotations__` is used and stringified
357357
using :func:`annotations_to_string`.
358358

359-
* When calling :attr:`!object.__annotate__` it is first called with :attr:`~Format.STRING`,
360-
if this is not implemented it will then check if :attr:`~Format.VALUE_WITH_FAKE_GLOBALS`
359+
* When calling :attr:`!object.__annotate__` it is first called with :attr:`~Format.STRING`.
360+
If this is not implemented, it will then check if :attr:`~Format.VALUE_WITH_FAKE_GLOBALS`
361361
is supported and use that in the fake globals environment.
362-
If neither of these formats are supported it will fall back to using :attr:`~Format.VALUE`
362+
If neither of these formats are supported, it will fall back to using :attr:`~Format.VALUE`
363363
with the result converted using :func:`annotations_to_string`.
364364
If :attr:`~Format.VALUE` fails, the error from this call will be raised.
365365

Lib/annotationlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ def call_annotate_function(annotate, format, *, owner=None, _is_evaluate=False):
671671
try:
672672
annotate(Format.VALUE_WITH_FAKE_GLOBALS)
673673
except NotImplementedError:
674-
# Both STRING and VALUE_WITH_FAKE_GLOBALS are not implemented fallback to VALUE
674+
# Both STRING and VALUE_WITH_FAKE_GLOBALS are not implemented: fallback to VALUE
675675
return annotations_to_string(annotate(Format.VALUE))
676676
except Exception:
677677
pass

0 commit comments

Comments
 (0)