Answer
Using trigonometry, the lever arm is Lcosθ.
(The ‘lever arm’ is the perpendicular distance from A to the line of action of the tension. It corresponds to the distance from A to where the rope is attached to the wall.)
So the magnitude of the torque is TLcosθ.