Copyright and fix for test formatter (#107)

This commit is contained in:
Bao Le 2024-02-22 12:05:06 +08:00 committed by GitHub
parent c2f6dba462
commit df34e547ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 35 additions and 22 deletions

View file

@ -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))