How do you handle a special assessment for rental property that was paid the same year the property was sold?

The special assessment was paid in monthly installments from January-July in 2018. The final installment was paid on July 22 and the rental property was sold on July 27. The total amount was $630. You cannot depreciate anything that's been held for less than one year, so can you claim it as an expense?

Thank you.