[BE] Enable ruff's UP rules and autoformat distributed/ (#105433)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/105433
Approved by: https://github.com/albanD
This commit is contained in:
Justin Chu
2023-07-18 22:34:37 -07:00
committed by PyTorch MergeBot
parent 2125794c12
commit 232b96b6e2
54 changed files with 131 additions and 175 deletions

View File

@ -8,7 +8,7 @@ import torch.distributed as dist
__all__ = ['JoinHook', 'Joinable', 'Join']
class JoinHook():
class JoinHook:
r"""
This defines a join hook, which provides two entry points in the join
context manager: a main hook, which is called repeatedly while there exists
@ -109,7 +109,7 @@ class _JoinConfig(NamedTuple):
class Join():
class Join:
r"""
This class defines the generic join context manager, which allows custom
hooks to be called after a process joins. These hooks should shadow the