Add ufmt to unify black and usort (#81157)

This reworks [80257](https://github.com/pytorch/pytorch/pull/80257) a bit to use ufmt:

* ufmt https://ufmt.omnilib.dev/en/stable/ unifies both black and usort to automatically format the file in the "most Pythonic" way
* Also make a demo run for all files in `tools/linter/**/*.py`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/81157
Approved by: https://github.com/suo
This commit is contained in:
Huy Do
2022-07-11 19:20:22 +00:00
committed by PyTorch MergeBot
parent 747b3b311d
commit ef035d083e
15 changed files with 198 additions and 21 deletions

View File

@ -64,3 +64,6 @@ ignore_missing_imports = True
[mypy-mypy.*]
ignore_missing_imports = True
[mypy-usort.*]
ignore_missing_imports = True