type-checking-pattern

Fix F821 undefined name errors for optional dependencies using TYPE_CHECKING