If the municipal judge or an assistant municipal judge announces a candidacy or becomes a candidate in a general, special, or primary election, for any office of profit or trust under the laws of the state or the United States, the announcement or the candidacy constitutes an automatic resignation of the appointment, effective the date of the announcement or candidacy.
Tex. Gov't. Code § 30.010975