3.1 fix linting

Additional cleanup after #2957 was merged into master