Skip to content

Commit

Permalink
Revert "简化solvers导入"
Browse files Browse the repository at this point in the history
This reverts commit a362bde.
  • Loading branch information
ZhaoZuohong committed Jul 27, 2024
1 parent 20742ea commit d2782e6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 56 deletions.
5 changes: 3 additions & 2 deletions arknights_mower/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from evalidate import Expr

from arknights_mower import __version__
from arknights_mower.solvers import ReclamationAlgorithm, SecretFront
from arknights_mower.solvers.reclamation_algorithm import ReclamationAlgorithm
from arknights_mower.solvers.secret_front import SecretFront
from arknights_mower.utils import config, path, rapidocr
from arknights_mower.utils.csleep import MowerExit
from arknights_mower.utils.datetime import format_time
Expand Down Expand Up @@ -42,7 +43,7 @@ def initialize(tasks, scheduler=None):
if scheduler is not None:
scheduler.handle_error(True)
return scheduler
from arknights_mower.solvers import BaseSchedulerSolver
from arknights_mower.solvers.base_schedule import BaseSchedulerSolver

base_scheduler = BaseSchedulerSolver()
base_scheduler.operators = {}
Expand Down
35 changes: 0 additions & 35 deletions arknights_mower/solvers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,35 +0,0 @@
from .auto_fight import AutoFight
from .base_schedule import BaseSchedulerSolver
from .credit import CreditSolver
from .credit_fight import CreditFight
from .cultivate_depot import cultivate as cultivateDepotSolver
from .depotREC import depotREC as DepotSolver
from .mail import MailSolver
from .mission import MissionSolver
from .navigation import NavigationSolver
from .operation import OperationSolver
from .reclamation_algorithm import ReclamationAlgorithm
from .recruit import RecruitSolver
from .report import ReportSolver
from .secret_front import SecretFront
from .shop import CreditShop
from .skland import SKLand

__all__ = [
"AutoFight",
"BaseSchedulerSolver",
"CreditSolver",
"CreditFight",
"cultivateDepotSolver",
"DepotSolver",
"MailSolver",
"MissionSolver",
"NavigationSolver",
"OperationSolver",
"ReclamationAlgorithm",
"RecruitSolver",
"ReportSolver",
"SecretFront",
"CreditShop",
"SKLand",
]
32 changes: 15 additions & 17 deletions arknights_mower/solvers/base_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,21 @@
import cv2

from arknights_mower.data import agent_list, base_room_list
from arknights_mower.solvers import (
BaseMixin,
CreditFight,
CreditShop,
CreditSolver,
DepotSolver,
MailSolver,
MissionSolver,
NavigationSolver,
OperationSolver,
ReclamationAlgorithm,
RecruitSolver,
ReportSolver,
SecretFront,
SKLand,
cultivateDepotSolver,
)
from arknights_mower.solvers.base_mixin import BaseMixin
from arknights_mower.solvers.credit import CreditSolver
from arknights_mower.solvers.credit_fight import CreditFight
from arknights_mower.solvers.cultivate_depot import cultivate as cultivateDepotSolver
from arknights_mower.solvers.depotREC import depotREC as DepotSolver
from arknights_mower.solvers.mail import MailSolver
from arknights_mower.solvers.mission import MissionSolver
from arknights_mower.solvers.navigation import NavigationSolver
from arknights_mower.solvers.operation import OperationSolver
from arknights_mower.solvers.reclamation_algorithm import ReclamationAlgorithm
from arknights_mower.solvers.recruit import RecruitSolver
from arknights_mower.solvers.report import ReportSolver
from arknights_mower.solvers.secret_front import SecretFront
from arknights_mower.solvers.shop import CreditShop
from arknights_mower.solvers.skland import SKLand
from arknights_mower.utils import config, detector, hot_update, rapidocr
from arknights_mower.utils import typealias as tp
from arknights_mower.utils.csleep import MowerExit, csleep
Expand Down
3 changes: 2 additions & 1 deletion arknights_mower/solvers/credit_fight.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import cv2
from scipy.signal import argrelmin

from arknights_mower.solvers import AutoFight, NavigationSolver
from arknights_mower.solvers.auto_fight import AutoFight
from arknights_mower.solvers.navigation import NavigationSolver
from arknights_mower.utils import config
from arknights_mower.utils.graph import SceneGraphSolver
from arknights_mower.utils.image import cropimg, loadres
Expand Down
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def test_pushplus_push():
@app.route("/check-skland")
@require_token
def test_skland():
from arknights_mower.solvers import SKLand
from arknights_mower.solvers.skland import SKLand

return SKLand().test_connect()

Expand Down

0 comments on commit d2782e6

Please sign in to comment.