From 84649cc7d3ac5dc7ae47b06cfc4e32259ebb4827 Mon Sep 17 00:00:00 2001 From: Kimiyuki Onaka Date: Tue, 19 Feb 2019 10:10:36 +0900 Subject: [PATCH] #318: remove problem.get_standings() --- onlinejudge/_implementation/command/get_standings.py | 2 +- onlinejudge/service/topcoder.py | 2 +- onlinejudge/type.py | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/onlinejudge/_implementation/command/get_standings.py b/onlinejudge/_implementation/command/get_standings.py index e869cc01..ddc25c33 100644 --- a/onlinejudge/_implementation/command/get_standings.py +++ b/onlinejudge/_implementation/command/get_standings.py @@ -18,7 +18,7 @@ def get_standings(args: 'argparse.Namespace') -> None: sys.exit(1) # get standings - header, rows = problem.get_standings() + header, rows = problem.get_standings() # type: ignore # print it if args.format in ['csv', 'tsv']: diff --git a/onlinejudge/service/topcoder.py b/onlinejudge/service/topcoder.py index 953927d3..ba391f4b 100644 --- a/onlinejudge/service/topcoder.py +++ b/onlinejudge/service/topcoder.py @@ -186,7 +186,7 @@ def submit_code(self, code: bytes, language_id: LanguageId, filename: Optional[s log.failure('%s', messages) raise SubmissionError('it may be a rate limit: ' + messages) - def get_standings(self, session: Optional[requests.Session] = None) -> onlinejudge.type.Standings: + def get_standings(self, session: Optional[requests.Session] = None): session = session or utils.new_default_session() header = None # type: Optional[List[str]] diff --git a/onlinejudge/type.py b/onlinejudge/type.py index 88cf4923..7194c354 100644 --- a/onlinejudge/type.py +++ b/onlinejudge/type.py @@ -80,9 +80,6 @@ def get_service(self) -> Service: def get_input_format(self, session: Optional[requests.Session] = None) -> Optional[str]: raise NotImplementedError - def get_standings(self, session: Optional[requests.Session] = None) -> Standings: - raise NotImplementedError - @classmethod def from_url(self, s: str) -> Optional['Problem']: pass