Copyright and fix for test formatter (#107)
This commit is contained in:
parent
c2f6dba462
commit
df34e547ad
5 changed files with 35 additions and 22 deletions
|
@ -25,8 +25,11 @@ def id_to_path(id):
|
|||
|
||||
|
||||
def get_names_in_archive(file_path):
|
||||
suffixes = ("inp", "out", "INP", "OUT")
|
||||
with ZipFile(os.path.join(settings.MEDIA_ROOT, file_path)) as f:
|
||||
result = [x for x in f.namelist() if not x.endswith("/")]
|
||||
result = [
|
||||
x for x in f.namelist() if not x.endswith("/") and x.endswith(suffixes)
|
||||
]
|
||||
return list(sorted(result, key=tf_utils.natural_sorting_key))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue