Document any TYPE_CHECKING name works (#18443) · python/mypy@c4e2eb7

Original file line numberDiff line numberDiff line change

@@ -455,7 +455,7 @@ Example:

455455

# The rest of this file doesn't apply to Windows.

456456
457457

Some other expressions exhibit similar behavior; in particular,

458-

:py:data:`~typing.TYPE_CHECKING`, variables named ``MYPY``, and any variable

458+

:py:data:`~typing.TYPE_CHECKING`, variables named ``MYPY`` or ``TYPE_CHECKING``, and any variable

459459

whose name is passed to :option:`--always-true <mypy --always-true>` or :option:`--always-false <mypy --always-false>`.

460460

(However, ``True`` and ``False`` are not treated specially!)

461461