Skip to content

Commit d064b47

Browse files
committed
Decreased a page size. The old one became too large
1 parent a03477c commit d064b47

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

generate.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def parse_args() -> argparse.Namespace:
4040
"--page-size",
4141
type=int,
4242
help="Get at most this many problems (decrease if leetcode API times out)",
43-
default=1000,
43+
default=500,
4444
)
4545
parser.add_argument(
4646
"--list-id",
@@ -109,7 +109,9 @@ async def generate_anki_note(
109109
)
110110

111111

112-
async def generate(start: int, stop: int, page_size: int, list_id: str, output_file: str) -> None:
112+
async def generate(
113+
start: int, stop: int, page_size: int, list_id: str, output_file: str
114+
) -> None:
113115
"""
114116
Generate an Anki deck
115117
"""
@@ -176,7 +178,9 @@ async def generate(start: int, stop: int, page_size: int, list_id: str, output_f
176178
)
177179
leetcode_deck = genanki.Deck(LEETCODE_ANKI_DECK_ID, Path(output_file).stem)
178180

179-
leetcode_data = leetcode_anki.helpers.leetcode.LeetcodeData(start, stop, page_size, list_id)
181+
leetcode_data = leetcode_anki.helpers.leetcode.LeetcodeData(
182+
start, stop, page_size, list_id
183+
)
180184

181185
note_generators: List[Coroutine[Any, Any, LeetcodeNote]] = []
182186

@@ -204,7 +208,13 @@ async def main() -> None:
204208
"""
205209
args = parse_args()
206210

207-
start, stop, page_size, list_id, output_file = args.start, args.stop, args.page_size, args.list_id, args.output_file
211+
start, stop, page_size, list_id, output_file = (
212+
args.start,
213+
args.stop,
214+
args.page_size,
215+
args.list_id,
216+
args.output_file,
217+
)
208218
await generate(start, stop, page_size, list_id, output_file)
209219

210220

0 commit comments

Comments
 (0)