Skip to content

Commit 8bb8ad5

Browse files
committed
Code format.sh error clean
Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com>
1 parent 086f58b commit 8bb8ad5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ def get_package_version():
5858
status_output = subprocess.check_output(status_cmd).decode('ascii').strip()
5959
if status_output:
6060
print(f'Warning: Git working directory is not clean. Uncommitted changes:\n{status_output}')
61-
assert False, 'Git working directory is not clean'
61+
raise AssertionError('Git working directory is not clean')
6262

6363
cmd = ['git', 'rev-parse', '--short', 'HEAD']
6464
revision = '+' + subprocess.check_output(cmd).decode('ascii').rstrip()
65-
except:
65+
except Exception:
6666
revision = '+local'
6767
return f'{public_version}{revision}'
6868

@@ -137,7 +137,7 @@ def generate_default_envs(self):
137137
nvcc_flags.append('-DDISABLE_SM90_FEATURES')
138138

139139
# Disable internode and low-latency kernels
140-
assert False, 'Not implemented'
140+
raise AssertionError('Not implemented')
141141
else:
142142
# Prefer H800 series
143143
os.environ['TORCH_CUDA_ARCH_LIST'] = os.getenv('TORCH_CUDA_ARCH_LIST', '9.0')
@@ -190,7 +190,7 @@ def generate_default_envs(self):
190190
if name in os.environ:
191191
persistent_envs.append((name, os.environ[name]))
192192
if len(persistent_envs) > 0:
193-
print(f' > Persistent envs:')
193+
print(' > Persistent envs:')
194194
for k, v in persistent_envs:
195195
print(f' > {k}: {v}')
196196
print()

0 commit comments

Comments
 (0)