mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[BE] enable ruff
rule RSE
and remove useless parentheses in raise
statements (#124261)
Remove useless parentheses in `raise` statements if the exception type is raised with no argument. Pull Request resolved: https://github.com/pytorch/pytorch/pull/124261 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
b726a23d4e
commit
93e249969b
@ -458,7 +458,7 @@ class PContext(abc.ABC):
|
||||
@abc.abstractmethod
|
||||
def _start(self) -> None:
|
||||
"""Start processes using strategy defined in a particular context."""
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
@abc.abstractmethod
|
||||
def _poll(self) -> Optional[RunProcsResult]:
|
||||
@ -469,7 +469,7 @@ class PContext(abc.ABC):
|
||||
successfully or any process fails. Returns ``None`` if
|
||||
all processes are still running.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
def wait(self, timeout: float = -1, period: float = 1) -> Optional[RunProcsResult]:
|
||||
"""
|
||||
@ -514,7 +514,7 @@ class PContext(abc.ABC):
|
||||
@abc.abstractmethod
|
||||
def pids(self) -> Dict[int, int]:
|
||||
"""Return pids of processes mapped by their respective local_ranks."""
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
@abc.abstractmethod
|
||||
def _close(self, death_sig: signal.Signals, timeout: int = 30) -> None:
|
||||
@ -522,7 +522,7 @@ class PContext(abc.ABC):
|
||||
Terminates all processes managed by this context and cleans up any
|
||||
meta resources (e.g. redirect, error_file files).
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
def close(
|
||||
self, death_sig: Optional[signal.Signals] = None, timeout: int = 30
|
||||
|
Reference in New Issue
Block a user