diff options
author | Xavier Thomas <43476211+xavierohan@users.noreply.github.com> | 2020-01-24 11:14:18 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-24 11:14:18 +0530 |
commit | 9982a5855e33c03a4056d594eaf1122c24a8df70 (patch) | |
tree | 53605aec8500334c56c7db1f40f750ea5f8cf533 /tools | |
parent | aa48921879930b7fb8990f5a14837c71121337fc (diff) | |
download | numpy-9982a5855e33c03a4056d594eaf1122c24a8df70.tar.gz |
Updated cythonize.py with f-strings
Updated with f-strings for better readability
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/cythonize.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/cythonize.py b/tools/cythonize.py index 4d04906ea..65b79f716 100755 --- a/tools/cythonize.py +++ b/tools/cythonize.py @@ -73,8 +73,7 @@ def process_pyx(fromfile, tofile): required_version = LooseVersion('0.29.14') if LooseVersion(cython_version) < required_version: - raise RuntimeError('Building {} requires Cython >= {}'.format( - VENDOR, required_version)) + raise RuntimeError(f'Building {VENDOR} requires Cython >= {required_version}') subprocess.check_call( [sys.executable, '-m', 'cython'] + flags + ["-o", tofile, fromfile]) @@ -179,13 +178,13 @@ def process(path, fromfile, tofile, processor_function, hash_db): fulltopath = os.path.join(path, tofile) current_hash = get_hash(fullfrompath, fulltopath) if current_hash == hash_db.get(normpath(fullfrompath), None): - print('%s has not changed' % fullfrompath) + print(f'{fullfrompath} has not changed') return orig_cwd = os.getcwd() try: os.chdir(path) - print('Processing %s' % fullfrompath) + print(f'Processing {fullfrompath}') processor_function(fromfile, tofile) finally: os.chdir(orig_cwd) |