It depends on what was the special assessment for.
If considered repair, then deductible in the year it was paid.
If considered improvements, you add it to the cost basis and depreciate it.
For rental properties, repairs maintain the property's condition, while improvements enhance it by adding value or extending its life.