A Pennsylvania appeals court on Wednesday denied a request by District Attorney Larry Krasner that a Philadelphia judge be disqualified from hearing criminal cases because the judge’s girlfriend, a former city prosecutor, filed a racial-discrimination complaint against the District Attorney’s Office.

The 28-page Superior Court opinion, written by President Judge Emeritus John T. Bender, said that Krasner’s office failed to prove that Common Pleas Court Judge Scott DiClaudio should not continue to hear criminal cases.

“Only the most unreasonable and cynical layperson could harbor such a suspicion based on the mere possibility of future litigation by a relative of Judge DiClaudio,” Bender wrote, adding a footnote to the word relative that a domestic partner was “functionally the equivalent of a spouse under the Judicial Code of Conduct.”

Bender, writing for a three-judge panel that heard the case, acknowledged that “Judge DiClaudio cohabitates and is in a romantic relationship with [the domestic partner], and that relationship does give rise to the potential for conflicts of interest.”

The former assistant district attorney, Catherine Smith, filed a claim with the Pennsylvania Human Relations Commission alleging she was discriminated against because she is white. She was fired from the District Attorney’s Office in February.

Bender made a distinction between that type of claim and a lawsuit, which could lead to financial benefits. Smith has not filed a lawsuit.

The District Attorney’s Office also alleged that DiClaudio “personally communicated with multiple supervisors” in the office on his girlfriend’s behalf, in some cases urging that she get a promotion. The judge also allegedly communicated with the office after the recusal fight erupted and threatened that things would get “ugly” and Krasner could end up in jail.

Bender wrote that the District Attorney’s Office failed to present any evidence to support those allegations.

In total, Bender wrote that the appellate court was siding with DiClaudio, but said the matter of recusal could be revisited.

Krasner spokesperson Jane Roh said in a statement: "The District Attorney’s Office is reviewing the ruling as well as our options moving forward. " DeClaudio declined comment Wednesday night.