Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fzls committed Jun 13, 2024
1 parent f6da668 commit aa872fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 11 additions & 3 deletions config_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1738,8 +1738,14 @@ def from_config(self, cfg: CommonConfig):

self.retry = RetryConfigUi(form_layout, cfg.retry)

self.checkbox_disable_clear_login_status_when_duplicate_login = create_checkbox(cfg.disable_clear_login_status_when_duplicate_login)
add_row(form_layout, "是否禁用在检测到重复登录时清除全部账号登录状态的功能", self.checkbox_disable_clear_login_status_when_duplicate_login)
self.checkbox_disable_clear_login_status_when_duplicate_login = create_checkbox(
cfg.disable_clear_login_status_when_duplicate_login
)
add_row(
form_layout,
"是否禁用在检测到重复登录时清除全部账号登录状态的功能",
self.checkbox_disable_clear_login_status_when_duplicate_login,
)

self.setLayout(make_scroll_layout(top_layout))

Expand Down Expand Up @@ -1781,7 +1787,9 @@ def update_config(self, cfg: CommonConfig):
self.checkbox_cost_all_cards_and_do_lottery_on_last_day.isChecked()
)

cfg.disable_clear_login_status_when_duplicate_login = self.checkbox_disable_clear_login_status_when_duplicate_login.isChecked()
cfg.disable_clear_login_status_when_duplicate_login = (
self.checkbox_disable_clear_login_status_when_duplicate_login.isChecked()
)

self.login.update_config(cfg.login)
self.retry.update_config(cfg.retry)
Expand Down
14 changes: 5 additions & 9 deletions djc_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2228,7 +2228,7 @@ def xinyue_op(self, ctx, iActivityId, iFlowId, package_id="", print_res=True, lq
**extra_params,
)

def check_xinyue_battle_ground_wpe(self) -> XinYueBattleGroundWpeBindRole:
def check_xinyue_battle_ground_wpe(self) -> XinYueBattleGroundWpeBindRole | None:
"""检查心悦战场的绑定信息,并返回绑定信息"""
# 运行期间仅尝试获取一次
if not hasattr(self, "dnf_xinyue_wpe_bind_role"):
Expand All @@ -2249,11 +2249,7 @@ def check_xinyue_battle_ground_wpe(self) -> XinYueBattleGroundWpeBindRole:

def xinyue_battle_ground_wpe_query_bind_role(self) -> XinYueBattleGroundWpeBindRole | None:
"""查询心悦战场的绑定信息"""
json_data = {
"game_code": "dnf",
"device": "pc",
"scene": "tgclub_act_15488"
}
json_data = {"game_code": "dnf", "device": "pc", "scene": "tgclub_act_15488"}

raw_res = self.post(
"查询心悦绑定信息",
Expand All @@ -2274,7 +2270,6 @@ def xinyue_battle_ground_wpe_query_bind_role(self) -> XinYueBattleGroundWpeBindR

return res.roles[0]


def xinyue_battle_ground_wpe_bind_role(self) -> bool:
"""绑定心悦战场为道聚城的绑定角色"""
# 使用道聚城的绑定信息去绑定心悦战场
Expand Down Expand Up @@ -12353,7 +12348,9 @@ def dnf_kanina(self):

# self.dnf_kanina_op("打开彩蛋", "296684")
for take_cash_success_people_count in [5000, 10000, 30000]:
self.dnf_kanina_op(f"全服提现达标奖励 - {take_cash_success_people_count}人", "296906", index=take_cash_success_people_count)
self.dnf_kanina_op(
f"全服提现达标奖励 - {take_cash_success_people_count}人", "296906", index=take_cash_success_people_count
)
time.sleep(5)
# self.dnf_kanina_op("新职业角色任务", "296966")

Expand Down Expand Up @@ -14821,4 +14818,3 @@ def watch_live():
djcHelper.dnf_luodiye_ide()

pause()

0 comments on commit aa872fa

Please sign in to comment.