From bf1771d054f74402fa345cb732a42fb0879496af Mon Sep 17 00:00:00 2001 From: gouzil <66515297+gouzil@users.noreply.github.com> Date: Sat, 25 Mar 2023 11:47:29 +0800 Subject: [PATCH] [CodeStyle][B016] Clear raise (#52118) --- pyproject.toml | 2 +- python/paddle/distributed/launch/plugins/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8ae89acd9ad..475f7d8ef84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,7 +98,7 @@ select = [ "B013", "B014", # "B015", - # "B016", + "B016", # "B017", "B018", "B019", diff --git a/python/paddle/distributed/launch/plugins/__init__.py b/python/paddle/distributed/launch/plugins/__init__.py index 4b2794a38ac..b3b89e0f116 100644 --- a/python/paddle/distributed/launch/plugins/__init__.py +++ b/python/paddle/distributed/launch/plugins/__init__.py @@ -39,7 +39,7 @@ def process_args(ctx): if ctx.args.ips: ips = ctx.args.ips.split(',') if '127.0.0.1' in ips and len(ips) != 1: - raise "127.0.0.1 in ips is not allowed in multi-nodes." + raise ValueError("127.0.0.1 in ips is not allowed in multi-nodes.") def collective_compatible(ctx): -- GitLab