[BE] Enable ruff's UP rules and autoformat nn/ mps/ and torch/ (#105436)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/105436
Approved by: https://github.com/malfet, https://github.com/albanD
This commit is contained in:
Justin Chu
2023-07-20 21:56:13 -07:00
committed by PyTorch MergeBot
parent 322dff475c
commit 79c5e33349
89 changed files with 296 additions and 320 deletions

View File

@ -68,7 +68,7 @@ class TorchVersion(str):
# * (1) -> Version("1")
# * (1, 20) -> Version("1.20")
# * (1, 20, 1) -> Version("1.20.1")
return Version('.'.join((str(item) for item in inp)))
return Version('.'.join(str(item) for item in inp))
else:
raise InvalidVersion(inp)