The greater issue here is possible derating due to heat in the attic. You would need to look at the rating of the wire, if say, NM-B, which carries a 90°C rating, and for the purposes of temp derating, you get to start with the 90°C column of the chart, which is 40 amps for #10. Then, temps above 86°F cause the derating. Lets say the attic can reach temps of 125°F in the summer, which is quite possible. Our correction factor is .75 thus 40 amps times .75 equals..... drumroll please!........ 30 amps...........
However, if you think the attic is hotter than this............. say, 149°F, then your correction factor is .47 and this gives you a maximum circuit capacity of 19 amps, and THIS could be a problem.
I'll let you decide
Charles