Prime Minister Sébastien Lecornu had warned that failing to pass a budget before the end of the year was a “danger” for the French economy.