“Partner with a thief”: By refusing to testify with full disclosure to avoid incrimination, one commits perjury which leads to punishment.
To be partner with a thief makes you a thief also. Even if you did not steal, you would be guilty by association.
We see in the last part of this, it is speaking of knowing of a sin and not speaking out to reveal the sin. If you hide the sin, even if you did not commit the crime, you would be an accomplice and punished along with the criminal.
Consider how bad your sins are for not telling the truth in court – you have added lying as a false witness to the stealing by the thief that you are protecting. God hates the sin of being a false witness and those who commit it, as Solomon clearly wrote (Pr 6:16-19).
Can you cover for a thief and be innocent? Do you think your sin is mild, since you did not steal anything yourself? You are a fool; you hate your own soul; and judgment is coming. God hates accomplices as much as thieves. Do not deceive yourself that you are innocent. If you can expose a criminal or help solve a crime, it is your duty to tell all.