diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-03-04 17:16:11 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-03-04 17:16:11 -0500 |
commit | 6a0fabc6472f49621260de215f128a31ae70219b (patch) | |
tree | 6a67908358a2c5e5baa215fe0201dfe213dd8a01 /ghwt.py | |
parent | 4340bf34faca7eed8076ba4c388fbe15355f2183 (diff) | |
download | meson-6a0fabc6472f49621260de215f128a31ae70219b.zip meson-6a0fabc6472f49621260de215f128a31ae70219b.tar.gz meson-6a0fabc6472f49621260de215f128a31ae70219b.tar.bz2 |
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
Diffstat (limited to 'ghwt.py')
-rwxr-xr-x | ghwt.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -43,7 +43,7 @@ def list_projects(): def unpack(sproj, branch): tmpdir = os.path.join(spdir, sproj + '_ghwt') shutil.rmtree(tmpdir, ignore_errors=True) - subprocess.check_call(['git', 'clone', '-b', branch, 'https://github.com/mesonbuild/{}.git'.format(sproj), tmpdir]) + subprocess.check_call(['git', 'clone', '-b', branch, f'https://github.com/mesonbuild/{sproj}.git', tmpdir]) usfile = os.path.join(tmpdir, 'upstream.wrap') assert(os.path.isfile(usfile)) config = configparser.ConfigParser(interpolation=None) @@ -52,7 +52,7 @@ def unpack(sproj, branch): if 'directory' in config['wrap-file']: outdir = os.path.join(spdir, config['wrap-file']['directory']) if os.path.isdir(outdir): - print('Subproject is already there. To update, nuke the {} dir and reinstall.'.format(outdir)) + print(f'Subproject is already there. To update, nuke the {outdir} dir and reinstall.') shutil.rmtree(tmpdir) return 1 us_url = config['wrap-file']['source_url'] @@ -85,7 +85,7 @@ def install(sproj, requested_branch=None): if not os.path.isdir(spdir): print('Run this in your source root and make sure there is a subprojects directory in it.') return 1 - blist = gh_get('https://api.github.com/repos/mesonbuild/{}/branches'.format(sproj)) + blist = gh_get(f'https://api.github.com/repos/mesonbuild/{sproj}/branches') blist = [b['name'] for b in blist] blist = [b for b in blist if b != 'master'] blist.sort() |