-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update pre-commit and format all files (#80)
* update pre-commit-config * meet pre-commit requirements * fix bug caused by last commit * fix new code pre-commit * bump version * update README
- Loading branch information
Showing
74 changed files
with
2,795 additions
and
2,641 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,47 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
default_stages: [pre-commit, pre-push, manual] | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: check-added-large-files | ||
- id: check-symlinks | ||
- id: destroyed-symlinks | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
exclude: autowsgr/data/map/ | ||
- id: check-toml | ||
- id: check-ast | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-shebang-scripts-are-executable | ||
- id: detect-private-key | ||
- id: debug-statements | ||
- repo: https://github.com/psf/black | ||
rev: 24.8.0 | ||
- id: double-quote-string-fixer | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.7.0 | ||
hooks: | ||
- id: black | ||
- id: black-jupyter | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.19.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py310-plus] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: [".[toml]"] | ||
exclude: | | ||
(?x)( | ||
^examples/.*\.(txt|json)$ | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "1.0.2.0" | ||
__version__ = '1.0.3.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
class COLORS: | ||
"""存储一些用于鉴定状态的颜色信息 | ||
所有颜色为 RGB 格式 | ||
""" | ||
|
||
CHALLENGE_BLUE = (33, 132, 226) # 演习界面,挑战按钮的颜色 | ||
SUPPORT_ENABLE = (228, 182, 60) # 支援启用的黄色 | ||
SUPPORT_DISABLE = (44, 142, 239) # 支援禁用的蓝色 | ||
SUPPORT_ENLESS = (143, 145, 154) # 支援次数用尽的灰色 | ||
BLOOD_COLORS = [ | ||
[ | ||
(69, 162, 117), | ||
(246, 184, 51), | ||
( | ||
230, | ||
58, | ||
89, | ||
), | ||
(96, 91, 92), | ||
(43, 87, 112), | ||
], | ||
[ | ||
(70, 182, 88), | ||
(238, 186, 64), | ||
(166, 33, 3), | ||
], | ||
] | ||
|
||
"""血条的 RGB 格式颜色,[0] 为准备界面,[1] 为战斗结算接界面 | ||
[0]从右到左依次为 [0] 绿色,[1] 黄色,[2] 红色,[3] 黑色,[4] 蓝色 | ||
[1]从左到右依次为 [0] 绿色,[1] 黄色,[2] 红色 | ||
""" | ||
class COLORS: | ||
"""存储一些用于鉴定状态的颜色信息 | ||
所有颜色为 RGB 格式 | ||
""" | ||
|
||
CHALLENGE_BLUE = (33, 132, 226) # 演习界面,挑战按钮的颜色 | ||
SUPPORT_ENABLE = (228, 182, 60) # 支援启用的黄色 | ||
SUPPORT_DISABLE = (44, 142, 239) # 支援禁用的蓝色 | ||
SUPPORT_ENLESS = (143, 145, 154) # 支援次数用尽的灰色 | ||
BLOOD_COLORS = ( | ||
( | ||
(69, 162, 117), | ||
(246, 184, 51), | ||
( | ||
230, | ||
58, | ||
89, | ||
), | ||
(96, 91, 92), | ||
(43, 87, 112), | ||
), | ||
( | ||
(70, 182, 88), | ||
(238, 186, 64), | ||
(166, 33, 3), | ||
), | ||
) | ||
|
||
"""血条的 RGB 格式颜色,[0] 为准备界面,[1] 为战斗结算接界面 | ||
[0]从右到左依次为 [0] 绿色,[1] 黄色,[2] 红色,[3] 黑色,[4] 蓝色 | ||
[1]从左到右依次为 [0] 绿色,[1] 黄色,[2] 红色 | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
from os.path import dirname, join | ||
|
||
DATA_ROOT = join(dirname(dirname(__file__)), "data") | ||
IMG_ROOT = join(DATA_ROOT, "images") | ||
MAP_ROOT = join(DATA_ROOT, "map") | ||
SETTING_ROOT = join(DATA_ROOT, "settings") | ||
OCR_ROOT = join(DATA_ROOT, "ocr") | ||
|
||
BIN_ROOT = join(dirname(DATA_ROOT), "bin") | ||
TUNNEL_ROOT = join(BIN_ROOT, "image_recognize") | ||
ADB_ROOT = join(BIN_ROOT, "adb") | ||
DATA_ROOT = join(dirname(dirname(__file__)), 'data') | ||
IMG_ROOT = join(DATA_ROOT, 'images') | ||
MAP_ROOT = join(DATA_ROOT, 'map') | ||
SETTING_ROOT = join(DATA_ROOT, 'settings') | ||
OCR_ROOT = join(DATA_ROOT, 'ocr') | ||
|
||
BIN_ROOT = join(dirname(DATA_ROOT), 'bin') | ||
TUNNEL_ROOT = join(BIN_ROOT, 'image_recognize') | ||
ADB_ROOT = join(BIN_ROOT, 'adb') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
DOCK_FULL_FLAG = "dock is full" | ||
FIGHT_END_FLAG = "fight end" | ||
FIGHT_CONTINUE_FLAG = "fight continue" | ||
OPERATION_SUCCESS_FLAG = "success" | ||
BATTLE_TIMES_EXCEED = "out of times" | ||
DOCK_FULL_FLAG = 'dock is full' | ||
FIGHT_END_FLAG = 'fight end' | ||
FIGHT_CONTINUE_FLAG = 'fight continue' | ||
OPERATION_SUCCESS_FLAG = 'success' | ||
BATTLE_TIMES_EXCEED = 'out of times' |
Oops, something went wrong.