Skip to content

Commit 0703618

Browse files
committed
ruff
1 parent 09a52e2 commit 0703618

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.github/workflows/tests.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,22 @@ jobs:
9797
--project="${{ github.workspace }}" \
9898
--directory="${{ runner.temp }}/pytests" \
9999
--with "geltest@git+https://github.com/geldata/geltest.git@debug" \
100-
geltest --verbose
100+
geltest --verbose --exclude test_cqa_ruff
101+
102+
lint:
103+
runs-on: ubuntu-latest
104+
steps:
105+
- uses: astral-sh/ruff-action@57714a7c8a2e59f32539362ba31877a1957dded1 # v3.5.1
106+
with:
107+
version: "0.12.11"
108+
- run: ruff check
109+
- run: ruff format --check
101110

102111
# This job exists solely to act as the test job aggregate to be
103112
# targeted by branch policies.
104113
regression-tests:
105114
name: "Regression Tests"
106-
needs: [test]
115+
needs: [test, lint]
107116
runs-on: ubuntu-latest
108117

109118
steps:

gel/_internal/_testbase/_base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,12 +1106,13 @@ def xfail(
11061106
def xfail(
11071107
func_or_reason: str | Callable[_P, _R], /
11081108
) -> Callable[_P, _R] | Callable[[Callable[_P, _R]], Callable[_P, _R]]:
1109-
def t(f: Callable[_P, _R]) -> Callable[_P, _R]:
1110-
return unittest.expectedFailure(f)
1111-
11121109
if callable(func_or_reason):
11131110
return unittest.expectedFailure(func_or_reason)
11141111
else:
1112+
1113+
def t(f: Callable[_P, _R]) -> Callable[_P, _R]:
1114+
return unittest.expectedFailure(f)
1115+
11151116
return t
11161117

11171118

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,11 @@ extend-ignore = [
225225

226226
[tool.ruff.format]
227227
quote-style = "preserve"
228+
exclude = [
229+
"docs/*",
230+
"edgedb/*",
231+
"tests/*",
232+
]
228233

229234
# ========================
230235
# PYTEST

0 commit comments

Comments
 (0)