Correct, but he never switched. He started with socialists and ended with socialists. He didn’t move from right to left, but from left to left.
Marechal Pétain, a fascist, was the Nazi collaborator who headed the Vichy government. It was his young assistant, François Mitterrand, who was responsible for forcing French Jews to wear the yellow Star of David, then supervised the deportation of French Jews to Nazi death camps.
After the Allied victory in Europe, Pétain was tried and executed as a traitor. Mitterrand hid his past, went over to the left and the Socialist Party, and the rest is history.