serving
serving copied to clipboard
Fix subset of linting rules
Supersedes #2252
Applies pre-commit with Ruff rules from #2251
The description from #2252 applies here:
This PR fixes a bunch of existing lint issues that were automatically fixed by
ruff --fix, in preparation for merging #2251. I've ignored a bunch of rule violations, but marked them inruff.tomlso that they can be systematically re-enabled and the violations fixed one by one. The vast majority of these changes are:
- Removing useless whitespace at the end of lines
- Making sure the end of file contains a newline
- Removing unnecessary python 2/3 compatibility
__future__imports- Import sorting
- Replacing calls to
format()with f-strings, which are faster and more expressive