Skip to content

Commit 7c165c7

Browse files
save keys to exclude as a global variable
1 parent 2bd8b50 commit 7c165c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diffpy/labpdfproc/tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
WAVELENGTHS = {"Mo": 0.71, "Ag": 0.59, "Cu": 1.54}
66
known_sources = [key for key in WAVELENGTHS.keys()]
7+
METADATA_KEYS_TO_EXCLUDE = ["output_correction", "force_overwrite", "input", "input_paths"]
78

89

910
def set_output_directory(args):
@@ -240,8 +241,7 @@ def load_metadata(args, filepath):
240241

241242
args = _set_anode_type(args)
242243
metadata = vars(args)
243-
exclude_keys = ["output_correction", "force_overwrite", "input", "input_paths"]
244-
for key in exclude_keys:
244+
for key in METADATA_KEYS_TO_EXCLUDE:
245245
metadata.pop(key, None)
246246
metadata["input_directory"] = str(filepath)
247247
metadata["output_directory"] = str(metadata["output_directory"])

0 commit comments

Comments
 (0)