Someone slightly on the spectrum who's somewhat awkward in conversation but an otherwise great developer? Probably a pass, unless their conversational awkwardness makes communication difficult.
Someone further on the spectrum who has a meltdown if their daily routine is even slightly disrupted? Probably not a pass, unless that routine never crosses the path of a coworker.
Someone with untreated bipolar disorder who lashes out with little provocation at their coworkers? Fail.
Someone with an IQ of 80 who's literally incapable of coding, and would thus be total dead weight on the team? Fail.