The effect could be two things:
First, pyridine may function as a base to partially deprotonate the amine so that it is more nucelophilic. The pyridinium that results could then protonate the carboxylate that is formed after the amine attacks the anhydride. This is necessary because you will ultimately lose water to form the succinimide. Pyridine would essentially function as a proton shuttle.
Second, pyridine is a rather good nucleophile and if used in excess may react with the anhydride to make an acyl-pyridinium ion which is very, very reactive. This ion could then be attacked by the amine.