Skip to content

Commit 10f45f0

Browse files
committed
Bump ruff to 0.6.5
1 parent 7073039 commit 10f45f0

File tree

5 files changed

+29
-27
lines changed

5 files changed

+29
-27
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.4.2
4+
rev: v0.6.5
55
hooks:
66
# Run the linter.
77
- id: ruff
@@ -13,4 +13,4 @@ repos:
1313
name: Check License
1414
entry: python licenses/update_license.py . licenses/license_template.txt
1515
language: system
16-
types: [python]
16+
types: [python]

crab/actions/android_actions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def swipe(element: int, direction: SwipeDirection, dist: SwipeDist, env) -> None
148148
offset = unit_dist, 0
149149
else:
150150
return "ERROR"
151-
adb_command = f"shell input swipe {x} {y} {x+offset[0]} {y+offset[1]} 200"
151+
adb_command = f"shell input swipe {x} {y} {x + offset[0]} {y + offset[1]} 200"
152152
execute_adb(adb_command, env)
153153
sleep(_DURATION)
154154

@@ -213,7 +213,9 @@ def stop_all_apps(env) -> None:
213213
execute_adb("shell input keyevent KEYCODE_HOME", env)
214214
execute_adb("shell input keyevent KEYCODE_APP_SWITCH", env)
215215
sleep(0.5)
216-
command = f"shell input swipe 100 {env.height/2} {env.width-100} {env.height/2} 200"
216+
command = (
217+
f"shell input swipe 100 {env.height / 2} {env.width - 100} {env.height / 2} 200"
218+
)
217219
execute_adb(command, env)
218220
sleep(0.5)
219221
execute_adb("shell input tap 300 1400", env)

crab/core/models/evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Evaluator(Action):
2222
@field_validator("returns", mode="after")
2323
@classmethod
2424
def must_return_bool(cls, v: type[BaseModel]) -> type[BaseModel]:
25-
if v.model_fields["returns"].annotation != bool:
25+
if v.model_fields["returns"].annotation is not bool:
2626
raise ValueError("Evaluator must return bool.")
2727
return v
2828

poetry.lock

Lines changed: 20 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ camel = ["camel-ai"]
103103
[tool.poetry.group.dev.dependencies]
104104
mypy = "^1.8.0"
105105
pytest = "^8.0.0"
106-
ruff = "^0.1.14"
106+
ruff = "^0.6.5"
107107
ipykernel = "^6.29.3"
108108
pandas = "^2.2.2"
109109
sphinx = "^7"
@@ -115,8 +115,7 @@ certifi = "^2024.2.2"
115115
[tool.ruff]
116116
lint.select = ["E501", "E4", "E7", "E9", "F", "I"]
117117
lint.ignore = ["E731"]
118-
lint.ignore-init-module-imports = true
119-
exclude = ["docs/", "crab-benchmark-v0/thirdparty/"]
118+
exclude = ["docs/"]
120119

121120
[[tool.mypy.overrides]]
122121
module = ["dill", "easyocr"]

0 commit comments

Comments
 (0)