Fix Python 3.8 compatibility of a TypeAlias.
Review Request #14008 — Created July 2, 2024 and submitted — Latest diff uploaded
We had one place where we were defining a
TypeAlias
using the
newer-stylelist[...]
(and related), which doesn't work for Python
3.8. This works fine for type annotations on all versions, but for type
aliases, it's a runtime error. Luckily this was hidden behind a check
forTYPE_CHECKING
so it didn't break production.This change also moves a couple more things into the
TYPE_CHECKING
block.
Ran unit tests.