The mishna is discussing who is ineligible to be a judge or a witness,
enumerating close relatives (brother, uncle, father-in-law,
brother-in-law, son-in-law, etc) [*]. R. Yose adds: anyone who inherits.
R. Yehudah says the restriction applies even if you are no longer
so related, if you once were. Further, the rabbis say, a friend or
an enemy is ineligible. What is meant by a friend? One's
groomsman. Enemy? Anyone who, by reason of enmity, has not spoken
to one for three days. (27b)
The text later says that an enemy can sometimes be a witness but in
no case can be a judge. I don't see a discussion of how "enmity" is
evaluated. (What if you say I'm snubbing you and I say I'm just
inattentive?)
[*] I am using shorthand here; the text says things like "your sister's husband",
which is how R. Yehudah's case can come up (your sister died; is her husband
still ineligible?).