Source code for oi_cli2.model.BaseOj

from typing import Any, Union, AsyncIterator

from oi_cli2.model.LangKV import LangKV
from oi_cli2.model.ParseProblemResult import ParsedProblemResult
from oi_cli2.model.ProblemMeta import ContestMeta, ProblemMeta
from oi_cli2.model.Result import SubmissionResult


[docs]class BaseOj(object): def __init__(self): pass
[docs] async def init(self) -> None: pass
[docs] async def deinit(self) -> None: pass
[docs] def problem_by_id(self, problem_id: str) -> ParsedProblemResult: assert (False)
[docs] async def async_problem(self, problem: ProblemMeta) -> ParsedProblemResult: assert (False)
[docs] def problem(self, problem: ProblemMeta) -> ParsedProblemResult: assert (False)
[docs] def login_website(self, force: bool = False) -> bool: assert (False)
[docs] def reg_contest(self, cid: str) -> bool: assert (False)
[docs] def submit_code(self, problem_url: str, language_id: str, code_path: str) -> Union[bool, Any]: assert (False)
[docs] async def async_get_result_yield(self, problem_url: str, time_gap: float = 1) -> AsyncIterator[SubmissionResult]: raise NotImplementedError yield 0
[docs] def get_language(self) -> LangKV: assert (False)
[docs] def print_contest_list(self) -> bool: assert (False)
[docs] def print_friends_standing(self, cid: str) -> None: assert (False)
[docs] async def async_get_contest_meta(self, cid: str) -> ContestMeta: assert (False)
[docs] def get_contest_meta(self, cid: str) -> ContestMeta: assert (False)
[docs] @staticmethod def account_required() -> bool: assert (False)
[docs] @staticmethod def support_contest(): assert (False)
[docs] def cid2url(self, cid: str) -> str: assert (False)