Commit 614bfb27 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Replace set([list comprehension]) by lighter set(list comprehension)

parent 371b815d
......@@ -264,7 +264,7 @@ def validate_category_tree(storage, ignore_errors=[]):
})
if category_tree_json is not None:
dataset_codes_on_storage = set([dataset.dataset_code for dataset in storage.iter_datasets_dirs()])
dataset_codes_on_storage = set(dataset.dataset_code for dataset in storage.iter_datasets_dirs())
datasets_codes_in_category_tree = set(iter_category_tree_dataset_code(category_tree_json))
# Check that all datasets referenced in category_tree.json are present on disk
......@@ -342,7 +342,7 @@ def validate_releases(storage, ignore_errors=[]):
"location": "releases.json",
})
dataset_codes_on_storage = set([dataset.dataset_code for dataset in storage.iter_datasets_dirs()])
dataset_codes_on_storage = set(dataset.dataset_code for dataset in storage.iter_datasets_dirs())
datasets_codes_in_releases = set(iter_releases_dataset_code(releases_json))
# Check that all datasets referenced in releases.json are present on disk
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment