diff --git a/pyproject.toml b/pyproject.toml index 90c77878cd526..1aed6656bd0eb 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 4b2794a38acdc..b3b89e0f116df 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):