Simplify html extension check

Simplified the check a bit here since `endswith` will cover the previous check and also I've removed the preceding `.` to make sure the old check is still covered.
This commit is contained in:
David López
2022-01-18 11:39:34 +01:00
committed by GitHub
parent 9500c2dbb7
commit 2817fdb5b3
+1 -1
View File
@@ -369,7 +369,7 @@ class Data(metaclass=DataMeta):
"""
rel_paths = []
file_paths = []
if dataset.datatype.composite_type or dataset.extension == '.html' or dataset.extension.endswith('.html'):
if dataset.datatype.composite_type or dataset.extension.endswith('html'):
main_file = f"{name}.html"
rel_paths.append(main_file)
file_paths.append(dataset.file_name)