It's up to the PR's author to decide if they care enough to do better next time. By accepting their work and landing the change you've demonstrated an appreciation for their effort with open arms, and I feel this makes it more likely they will contribute in the future and care about doing better.
Maybe make a comment to that effect before merging as-is, creating the opportunity to clean it up themselves first.
If it's coming from a regular contributor I'm far less charitable, this approach I mostly reserve for first-time/infrequent contributors.