lim x->1 (2-x)^(tan(pi(x)/2))

I plugged it in and got 1^infinity (indeterminate form) because tan (pi(1)/2) is 1/0 or infinity

so:

lny = (tan(pi(x)/2)) * ln(2-x)

= ln(2-x) / cot (pi(x)/2)

L'H = (-1/2-x) / csc^2(pi(x)/2) ( -pi/2)

= -1/ -pi/2

= 2/pi

lim x->1 y = e^(2/pi)

?

Where did I go wrong?

Thanks