refactor: reduce import modules
This commit is contained in:
parent
a3cfca7a4d
commit
68d591d058
|
|
@ -4,7 +4,7 @@
|
|||
import argparse
|
||||
import json
|
||||
import re
|
||||
from datetime import date, datetime, timedelta
|
||||
from datetime import date, timedelta
|
||||
from itertools import chain
|
||||
from typing import Iterator, List, Optional, Tuple
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ def get_paper_urls(year: int) -> List[str]:
|
|||
ret = [i for i in ret if i not in PAPER_EXCLUDE]
|
||||
ret += PAPER_INCLUDE.get(year, [])
|
||||
ret.sort()
|
||||
if not ret and datetime.today().year >= year:
|
||||
if not ret and date.today().year >= year:
|
||||
raise RuntimeError("could not found papers for %d" % year)
|
||||
return ret
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user