Preheat the oven to 350F.
Line a 12-hole muffin pan with paper cups.
Sift together the flour, baking powder, cinnamon, nutmeg and salt.
Whisk the oil and sugar until smooth (I used a wire whisk). Add the egg, whisk until incorporated. Add the a third of the flour mixture and mix. Add half of the sour cream and mix. Add another third of the flour mixture, then the remaining half of the sour cream and, finally, the last third of the flour mixture, mixing after each addition. Stir in the mashed bananas and vanilla.
Pour the batter into the lined muffin pan. It is alright to almost fill the holes to the brim as the cupcake batter will only rise at the center. Sprinkle the walnuts on top of some or all the cupcakes.
Bake for 15 minutes at 350F.
Let the cupcakes cool in the pan for a couple of minutes then transfer to a wire rack to cool some more. Serve warm or at room temperature.