Skip to content

Commit

Permalink
Add a workaround for the confliction
Browse files Browse the repository at this point in the history
  • Loading branch information
kmyk committed May 3, 2020
1 parent 2f39aba commit 211ddfd
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 41 deletions.
3 changes: 1 addition & 2 deletions onlinejudge_command/download_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

import onlinejudge_command.logging as log
import onlinejudge_command.utils as utils

from onlinejudge.type import Problem
from onlinejudge_workaround_for_conflict.type import Problem


class DownloadHistory(object):
Expand Down
3 changes: 1 addition & 2 deletions onlinejudge_command/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import onlinejudge_command.logging as log
import onlinejudge_command.update_checking as update_checking
import onlinejudge_command.utils as utils
import onlinejudge_workaround_for_conflict.__about__ as api_version # see https://github.com/online-judge-tools/oj/issues/755#issuecomment-623118672
from onlinejudge_command.subcommand.download import download
from onlinejudge_command.subcommand.generate_input import generate_input
from onlinejudge_command.subcommand.generate_output import generate_output
Expand All @@ -18,8 +19,6 @@
from onlinejudge_command.subcommand.test import test
from onlinejudge_command.subcommand.test_reactive import test_reactive

import onlinejudge.__about__ as api_version


def get_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(description='Tools for online judge services')
Expand Down
7 changes: 3 additions & 4 deletions onlinejudge_command/subcommand/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
import onlinejudge_command.format_utils as format_utils
import onlinejudge_command.logging as log
import onlinejudge_command.utils as utils
import onlinejudge_workaround_for_conflict.dispatch as dispatch # see https://github.com/online-judge-tools/oj/issues/755#issuecomment-623118672
import requests.exceptions

import onlinejudge.dispatch as dispatch
from onlinejudge.service.yukicoder import YukicoderProblem
from onlinejudge.type import SampleParseError, TestCase
from onlinejudge_workaround_for_conflict.service.yukicoder import YukicoderProblem # see https://github.com/online-judge-tools/oj/issues/755#issuecomment-623118672
from onlinejudge_workaround_for_conflict.type import SampleParseError, TestCase # see https://github.com/online-judge-tools/oj/issues/755#issuecomment-623118672

if TYPE_CHECKING:
import argparse
Expand Down
5 changes: 2 additions & 3 deletions onlinejudge_command/subcommand/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

import onlinejudge_command.logging as log
import onlinejudge_command.utils as utils
import onlinejudge_workaround_for_conflict.dispatch as dispatch # see https://github.com/online-judge-tools/oj/issues/755#issuecomment-623118672
import requests

import onlinejudge.dispatch as dispatch
from onlinejudge.type import LoginError, Service
from onlinejudge_workaround_for_conflict.type import LoginError, Service # see https://github.com/online-judge-tools/oj/issues/755#issuecomment-623118672

if TYPE_CHECKING:
import argparse
Expand Down
5 changes: 2 additions & 3 deletions onlinejudge_command/subcommand/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
import onlinejudge_command.download_history
import onlinejudge_command.logging as log
import onlinejudge_command.utils as utils

import onlinejudge.dispatch as dispatch
from onlinejudge.type import *
import onlinejudge_workaround_for_conflict.dispatch as dispatch # see https://github.com/online-judge-tools/oj/issues/755#issuecomment-623118672
from onlinejudge_workaround_for_conflict.type import * # see https://github.com/online-judge-tools/oj/issues/755#issuecomment-623118672

if TYPE_CHECKING:
import argparse
Expand Down
5 changes: 2 additions & 3 deletions onlinejudge_command/update_checking.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

import onlinejudge_command.__about__ as version
import onlinejudge_command.logging as log
import onlinejudge_workaround_for_conflict.__about__ as api_version
import requests

import onlinejudge.__about__ as api_version
from onlinejudge.utils import user_cache_dir
from onlinejudge_workaround_for_conflict.utils import user_cache_dir


def describe_status_code(status_code: int) -> str:
Expand Down
5 changes: 2 additions & 3 deletions onlinejudge_command/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

import onlinejudge_command.__about__ as version
import onlinejudge_command.logging as log
import onlinejudge_workaround_for_conflict.utils as utils
import requests

import onlinejudge.utils as utils
from onlinejudge.type import *
from onlinejudge_workaround_for_conflict.type import *

user_data_dir = utils.user_data_dir
user_cache_dir = utils.user_cache_dir
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
description=version.__description__,
python_requires='>=3.5',
install_requires=[
'online-judge-api-client >= 10, < 11',
'online-judge-api-client >= 10.0.3, < 11',
'colorama >= 0.3',
'diff-match-patch >= 20181111',
'requests >= 2',
Expand Down
3 changes: 1 addition & 2 deletions tests/command_download_atcoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import requests.exceptions
import tests.command_download

from onlinejudge.type import SampleParseError
from onlinejudge_workaround_for_conflict.type import SampleParseError


class DownloadAtCoderTest(unittest.TestCase):
Expand Down
3 changes: 1 addition & 2 deletions tests/command_download_invalid.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import requests.exceptions
import tests.command_download

from onlinejudge.type import SampleParseError
from onlinejudge_workaround_for_conflict.type import SampleParseError


class DownloadInvalidTest(unittest.TestCase):
Expand Down
3 changes: 1 addition & 2 deletions tests/command_download_yukicoder.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import unittest

import tests.command_download

from onlinejudge.service.yukicoder import YukicoderService
from onlinejudge_workaround_for_conflict.service.yukicoder import YukicoderService


class DownloadYukicoderTest(unittest.TestCase):
Expand Down
11 changes: 5 additions & 6 deletions tests/command_login.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import unittest

import tests.utils

from onlinejudge.service.atcoder import AtCoderService
from onlinejudge.service.codeforces import CodeforcesService
from onlinejudge.service.hackerrank import HackerRankService
from onlinejudge.service.toph import TophService
from onlinejudge.service.yukicoder import YukicoderService
from onlinejudge_workaround_for_conflict.service.atcoder import AtCoderService
from onlinejudge_workaround_for_conflict.service.codeforces import CodeforcesService
from onlinejudge_workaround_for_conflict.service.hackerrank import HackerRankService
from onlinejudge_workaround_for_conflict.service.toph import TophService
from onlinejudge_workaround_for_conflict.service.yukicoder import YukicoderService


class LoginTest(unittest.TestCase):
Expand Down
11 changes: 5 additions & 6 deletions tests/command_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
import tests.utils
from onlinejudge_command.main import get_parser
from onlinejudge_command.subcommand.submit import submit

from onlinejudge.service.atcoder import AtCoderService
from onlinejudge.service.codeforces import CodeforcesService
from onlinejudge.service.hackerrank import HackerRankService
from onlinejudge.service.toph import TophService
from onlinejudge.service.yukicoder import YukicoderService
from onlinejudge_workaround_for_conflict.service.atcoder import AtCoderService
from onlinejudge_workaround_for_conflict.service.codeforces import CodeforcesService
from onlinejudge_workaround_for_conflict.service.hackerrank import HackerRankService
from onlinejudge_workaround_for_conflict.service.toph import TophService
from onlinejudge_workaround_for_conflict.service.yukicoder import YukicoderService


class SubmitArgumentsTest(unittest.TestCase):
Expand Down
3 changes: 1 addition & 2 deletions tests/implementation_language_guessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import unittest

import onlinejudge_command.subcommand.submit as submit

from onlinejudge.type import Language, LanguageId
from onlinejudge_workaround_for_conflict.type import Language, LanguageId

# https://atcoder.jp/contests/language-test-ver1
languages_atcoder_3 = [
Expand Down

0 comments on commit 211ddfd

Please sign in to comment.