File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 10
10
import util
11
11
import base64
12
12
from pathlib import Path
13
+ from typing import Optional
13
14
14
15
from contest import *
15
16
@@ -285,13 +286,12 @@ def update_contest_id(cid):
285
286
error ('ruamel.yaml library not found. Update the id manually.' )
286
287
287
288
288
- def export_contest ():
289
+ def export_contest (cid : Optional [ str ] ):
289
290
data = contest_yaml ()
290
291
291
292
if not data :
292
293
fatal ('Exporting a contest only works if contest.yaml is available and not empty.' )
293
294
294
- cid = get_contest_id ()
295
295
if cid :
296
296
data ['id' ] = cid
297
297
@@ -496,7 +496,7 @@ def export_contest_and_problems(problems, statement_language):
496
496
if cid is not None and cid != '' :
497
497
log (f'Reusing contest id { cid } from contest.yaml' )
498
498
if not any (contest ['id' ] == cid for contest in get_contests ()):
499
- cid = export_contest ()
499
+ cid = export_contest (cid )
500
500
501
501
with open (f'contest.{ statement_language } .pdf' , 'rb' ) as pdf_file :
502
502
r = call_api (
You can’t perform that action at this time.
0 commit comments