One may note that it is a simple pole, hence
$$\text{Res}_{z=\pi}\frac{z-\pi}{\sin^2z}=\lim_{z\to\pi}\frac{(z-\pi)^2}{\sin^2z}=1$$
One may note that it is a simple pole, hence
$$\text{Res}_{z=\pi}\frac{z-\pi}{\sin^2z}=\lim_{z\to\pi}\frac{(z-\pi)^2}{\sin^2z}=1$$