Skip to content

Commit a440f0e

Browse files
committed
[export] Pass cid from export_contest_and_problems to export_contest
The function export_contest is not used anywhere else anyway
1 parent 3948afd commit a440f0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/export.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import util
1111
import base64
1212
from pathlib import Path
13+
from typing import Optional
1314

1415
from contest import *
1516

@@ -285,13 +286,12 @@ def update_contest_id(cid):
285286
error('ruamel.yaml library not found. Update the id manually.')
286287

287288

288-
def export_contest():
289+
def export_contest(cid: Optional[str]):
289290
data = contest_yaml()
290291

291292
if not data:
292293
fatal('Exporting a contest only works if contest.yaml is available and not empty.')
293294

294-
cid = get_contest_id()
295295
if cid:
296296
data['id'] = cid
297297

@@ -496,7 +496,7 @@ def export_contest_and_problems(problems, statement_language):
496496
if cid is not None and cid != '':
497497
log(f'Reusing contest id {cid} from contest.yaml')
498498
if not any(contest['id'] == cid for contest in get_contests()):
499-
cid = export_contest()
499+
cid = export_contest(cid)
500500

501501
with open(f'contest.{statement_language}.pdf', 'rb') as pdf_file:
502502
r = call_api(

0 commit comments

Comments
 (0)