Skip to content

Commit 5125fa9

Browse files
committed
use f-strings instead of +
1 parent ce7ca2d commit 5125fa9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/diffpy/labpdfproc/labpdfprocapp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,14 @@ def _add_credit_args(parser, use_gui=False):
131131

132132

133133
def _save_corrected(corrected, input_path, args):
134-
outfile = args.output_directory / (input_path.stem + "-mud-corrected.chi")
134+
outfile = args.output_directory / (f"{input_path.stem}-mud-corrected.chi")
135135
corrected.metadata = corrected.metadata or {}
136136
corrected.dump(str(outfile), xtype=args.xtype)
137137
print(f"Saved corrected data to {outfile}")
138138

139139

140140
def _save_correction(correction, input_path, args):
141-
corrfile = args.output_directory / (input_path.stem + "-cve.chi")
141+
corrfile = args.output_directory / (f"{input_path.stem}-cve.chi")
142142
correction.metadata = correction.metadata or {}
143143
correction.dump(str(corrfile), xtype=args.xtype)
144144
print(f"Saved correction data to {corrfile}")

src/diffpy/labpdfproc/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,11 @@ def _check_saved_file_exists(args):
533533
and output directory."""
534534
existing_files = []
535535
for path in args.input_paths:
536-
outfile = args.output_directory / (path.stem + "-mud-corrected.chi")
536+
outfile = args.output_directory / (f"{path.stem}-mud-corrected.chi")
537537
if outfile.exists() and not args.force:
538538
existing_files.append(outfile)
539539
if args.output_correction:
540-
corrfile = args.output_directory / (path.stem + "-cve.chi")
540+
corrfile = args.output_directory / (f"{path.stem}-cve.chi")
541541
if corrfile.exists() and not args.force:
542542
existing_files.append(corrfile)
543543
if existing_files:

0 commit comments

Comments
 (0)