Skip to content

Commit b88b94c

Browse files
committed
Prefer f-strings
This gets rid of some errors from the pyupgrade pre-commit hook.
1 parent e01ab6e commit b88b94c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cyhy_runner/cyhy_runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def main():
186186

187187
group = args["--group"]
188188
if group:
189-
print('Setting effective group to "{}".'.format(group), file=sys.stderr)
189+
print(f'Setting effective group to "{group}".', file=sys.stderr)
190190

191191
new_gid = grp.getgrnam(group).gr_gid
192192
os.setegid(new_gid)
@@ -196,7 +196,7 @@ def main():
196196
working_dir = os.path.join(os.getcwd(), args["<working-dir>"])
197197
if not os.path.exists(working_dir):
198198
print(
199-
'Working directory "{}" does not exist.'.format(working_dir),
199+
f'Working directory "{working_dir}" does not exist.',
200200
end="",
201201
file=sys.stderr,
202202
)

0 commit comments

Comments
 (0)