Skip to content

Commit

Permalink
remove trailing ; from python files in util/
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmad Rezaii <[email protected]>
  • Loading branch information
arezaii committed Oct 10, 2024
1 parent e63ba08 commit 593c438
Show file tree
Hide file tree
Showing 17 changed files with 96 additions and 96 deletions.
4 changes: 2 additions & 2 deletions util/chplenv/chpl_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def determine_gpu_type():
error("Unable to determine GPU type%s, assign 'CHPL_GPU' to one of: [%s]" %
("" if len(typesFound) == 0 else " (detected: [%s])" % ", ".join(typesFound),
", ".join(GPU_TYPES.keys())))
return None;
return None

def get_llvm_override():
if get() == 'amd':
Expand All @@ -129,7 +129,7 @@ def get():
else:
return chpl_gpu_env
else:
return determine_gpu_type();
return determine_gpu_type()

@memoize
def get_arch():
Expand Down
2 changes: 1 addition & 1 deletion util/chplenv/chpl_home_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def add_vars_to_paths_helper(s, tofix):

for kv in tofix:
key = kv[0]
val = kv[1];
val = kv[1]

if path.startswith(val):
rel = os.path.relpath(path, val)
Expand Down
2 changes: 1 addition & 1 deletion util/chplenv/chpl_hwloc_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@memoize
def get():
hwloc_val = chpl_hwloc.get();
hwloc_val = chpl_hwloc.get()
debug_val = overrides.get('CHPL_HWLOC_DEBUG')
if not debug_val or hwloc_val != 'bundled':
debug_val = 'nodbg'
Expand Down
10 changes: 5 additions & 5 deletions util/chplenv/chpl_llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def check_llvm_packages(llvm_config):
contents = f.read()
if llvm_version in contents:
usr_include_clang_ok = True
clang_include_ok = True;
clang_include_ok = True

llvm_lib_dir = run_command([llvm_config, '--libdir']).strip()

Expand All @@ -195,16 +195,16 @@ def check_llvm_packages(llvm_config):
clang_lib_name = 'libclang-cpp.so'

if os.path.isdir(llvm_lib_dir):
clang_cpp_lib = os.path.join(llvm_lib_dir, clang_lib_name);
clang_cpp_lib = os.path.join(llvm_lib_dir, clang_lib_name)
clang_cpp_lib_ok = os.path.exists(clang_cpp_lib)
if usr_include_clang_ok and not clang_cpp_lib_ok:
# use e.g. /usr/lib/libclang-cpp.so
clang_cpp_lib = os.path.join("/usr/lib", clang_lib_name);
clang_cpp_lib = os.path.join("/usr/lib", clang_lib_name)
clang_cpp_lib_ok = os.path.exists(clang_cpp_lib)

if usr_include_clang_ok and not clang_cpp_lib_ok:
# use e.g. /usr/lib64/libclang-cpp.so
clang_cpp_lib = os.path.join("/usr/lib64", clang_lib_name);
clang_cpp_lib = os.path.join("/usr/lib64", clang_lib_name)
clang_cpp_lib_ok = os.path.exists(clang_cpp_lib)

s = ''
Expand Down Expand Up @@ -822,7 +822,7 @@ def get_system_llvm_built_sdkroot():
def get_clang_basic_args():
clang_args = [ ]

gcc_install_dir = get_gcc_install_dir();
gcc_install_dir = get_gcc_install_dir()
if gcc_install_dir:
clang_args.append('--gcc-install-dir=' + gcc_install_dir)
else:
Expand Down
2 changes: 1 addition & 1 deletion util/chplenv/chpl_qthreads.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@memoize
def get_uniq_cfg_path():
def_uniq_cfg = third_party_utils.default_uniq_cfg_path()
lm = chpl_locale_model.get();
lm = chpl_locale_model.get()
target_mem = chpl_mem.get('target')
hwloc = chpl_hwloc.get()
return '{0}-{1}-{2}-{3}'.format(def_uniq_cfg, lm, target_mem, hwloc)
Expand Down
2 changes: 1 addition & 1 deletion util/chplenv/compile_link_args_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_runtime_includes_and_defines():

incl = chpl_home_utils.get_chpl_runtime_incl()
locale_model = chpl_locale_model.get()
comm = chpl_comm.get();
comm = chpl_comm.get()
tasks = chpl_tasks.get()
atomics = chpl_atomics.get()
mem = chpl_mem.get('target')
Expand Down
4 changes: 2 additions & 2 deletions util/chplenv/third_party_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def pkgconfig_get_system_compile_args(pkg):
if not pkgconfig_system_has_package(pkg):
return (None, None)
# run pkg-config to get the cflags
cflags_line = run_command(['pkg-config', '--cflags'] + [pkg]);
cflags_line = run_command(['pkg-config', '--cflags'] + [pkg])
cflags = cflags_line.split()
return ([ ], cflags)

Expand Down Expand Up @@ -210,7 +210,7 @@ def pkgconfig_get_system_link_args(pkg, static=pkgconfig_default_static()):
if static:
static_arg = ['--static']

libs_line = run_command(['pkg-config', '--libs'] + static_arg + [pkg]);
libs_line = run_command(['pkg-config', '--libs'] + static_arg + [pkg])
libs = libs_line.split()
return ([ ], libs)

Expand Down
2 changes: 1 addition & 1 deletion util/config/make_sys_basic_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def get_sys_c_types(docs=False):
compileline_env.pop('CHPL_MAKE_CHPLENV_CACHE', None)
compileline_proc = subprocess.Popen([compileline_cmd, '--compile'],
stdout=subprocess.PIPE, env=compileline_env)
compileline = compileline_proc.communicate()[0].decode("utf-8").strip();
compileline = compileline_proc.communicate()[0].decode("utf-8").strip()
logging.debug('Compile line: {0}'.format(compileline))

# Create temp header file with *_MAX macros, then run it through the C
Expand Down
8 changes: 4 additions & 4 deletions util/config/replace-paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
if __name__ == '__main__':

parser = optparse.OptionParser(usage='usage: %prog [--fixpath key path]')
parser.add_option('--fixpath', nargs=2, dest='fixpath', action='append');
parser.add_option('--fixpath', nargs=2, dest='fixpath', action='append')

(options, args) = parser.parse_args()

Expand All @@ -24,14 +24,14 @@
for kv in options.fixpath:

key = kv[0]
val = kv[1];
val = kv[1]

val = os.path.realpath(val)
tofix.append([key, val])

#for kv in tofix:
# key = kv[0]
# val = kv[1];
# val = kv[1]
# sys.stdout.write("will replace {0} with {1}\n".format(val,key))

for line in sys.stdin.readlines():
Expand Down Expand Up @@ -61,7 +61,7 @@
for kv in tofix:

key = kv[0]
val = kv[1];
val = kv[1]

#sys.stdout.write("does it start with {0}\n".format(val))
if path.startswith(val):
Expand Down
2 changes: 1 addition & 1 deletion util/devel/test/apptainer/extract-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def extract_vfile_commands(vfile):

tab = { }

i = 0;
i = 0
while i < len(subdirs):
subpath = subdirs[i]
names = [ ]
Expand Down
6 changes: 3 additions & 3 deletions util/devel/test/apptainer/tryit.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def main():
ok = True
# Build/rebuild image.sif if needed
if os.path.exists("image.sif") and args.rebuild:
printAndLog(log, "Removing {}/image.sif".format(d));
printAndLog(log, "Removing {}/image.sif".format(d))
os.remove("image.sif")
if not os.path.exists("image.sif"):
e,r = runAndLog(log, ["apptainer", "build", "--fakeroot",
Expand Down Expand Up @@ -136,10 +136,10 @@ def main():

if args.cleanup:
if os.path.exists("image.sif"):
printAndLog(log, "Removing {}/image.sif".format(d));
printAndLog(log, "Removing {}/image.sif".format(d))
os.remove("image.sif")
if os.path.exists("chapel"):
printAndLog(log, "Removing {}/chapel".format(d));
printAndLog(log, "Removing {}/chapel".format(d))
shutil.rmtree("chapel")

printAndLog(log, "")
Expand Down
Loading

0 comments on commit 593c438

Please sign in to comment.