File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 20
20
from collections import namedtuple , OrderedDict
21
21
22
22
HOME = Path .cwd ()
23
+ MAX_DIGIT_LEN = 4 # 1000+ PROBLEMS
23
24
SOLUTION_FOLDER_NAME = 'solutions'
24
25
SOLUTION_FOLDER = Path .joinpath (HOME , SOLUTION_FOLDER_NAME )
25
26
CONFIG_FILE = Path .joinpath (HOME , 'config.cfg' )
@@ -466,7 +467,7 @@ def _download_code_by_quiz(self, quiz):
466
467
)
467
468
return
468
469
469
- qname = '{id}-{title}' .format (id = str (qid ).zfill (3 ), title = qtitle )
470
+ qname = '{id}-{title}' .format (id = str (qid ).zfill (MAX_DIGIT_LEN ), title = qtitle )
470
471
print ('begin download ' + qname )
471
472
path = Path .joinpath (SOLUTION_FOLDER , qname )
472
473
check_and_make_dir (path )
@@ -555,7 +556,7 @@ def write_readme(self):
555
556
if item .solutions :
556
557
dirname = '{folder}/{id}-{title}' .format (
557
558
folder = SOLUTION_FOLDER_NAME ,
558
- id = str (item .question_id ).zfill (3 ),
559
+ id =
48F6
span>str (item .question_id ).zfill (MAX_DIGIT_LEN ),
559
560
title = item .question__title_slug ,
560
561
)
561
562
language = ''
You can’t perform that action at this time.
0 commit comments