Add eggs, stir. Add salt, pepper and chopped basil.
Add flour and knead a soft dough. If the dough is too sticky, add more flour - the amount depends on the water content of the pumpkin.
Divide the dough into equal rolls 3 cm thick and about 20 cm long. Divide and cut each roll into a 2 cm long pieces.
Cook the gnocchi in a large pot in plenty of salted water. Gnocchi are cooked when they rise to the surface. Remove them from the pot with a slotted spoon.
Pour hot olive oil over gnocchi or simply sauté them in hot oil.