Skip to content

Commit

Permalink
[download_submissions] Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsijm committed Oct 30, 2024
1 parent 3b58231 commit 89c54c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/download_submissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
import base64
from os import makedirs

import requests
from pathlib import Path

import config
from verdicts import Verdict, from_string
from contest import call_api, get_contest_id
from util import ProgressBar
from util import ProgressBar, fatal

# Example usage:
# bt download_submissions [--user <username>] [--password <password>] [--contest <contest_id>] [--api <domjudge_url>]
Expand Down Expand Up @@ -83,7 +82,7 @@ def download_submissions():
)
bar.done()
continue
source = base64.b64decode(source_code[0]["source"]) # type: list[bytes]
source: bytes = base64.b64decode(source_code[0]["source"])
makedirs(f"submissions/{s['problem_id']}/{verdict_dir}", exist_ok=True)
teamid = f"{s['team_id']:>0{team_digits}}" if s['team_id'].isdigit() else s['team_id']
submissionid = f"{i:>0{submission_digits}}"
Expand Down

0 comments on commit 89c54c8

Please sign in to comment.