So I'm buying a house and need to repaint the entirety of the interior and replace all flooring.

I just got all the flooring up earlier today and was pleasantly surprised to find the original hardwood beneath the carpet.

Obviously they'll need refinishing and I'm in a bit of a daze after falling down a youtube hole, does anyone have an opinion on whether or not I should spread wood filler after doing my medium coat sanding or should I just go right to the highest grain sanding and then stain or add finish?

Also would it be better to finish the floors before or after painting?

I'm thinking before simply because if there are any drips I can just sand them out, but doing it after the floors but between the finish kind of means less cleanup in steps.

Help me MM-Obiwan Kenobi, you are my only hope. (No you're not.)