Skip to content

Commit 1abae00

Browse files
[ci] - Add Ruff formatting step to CI pipeline (#312)
* [ci] - Add Ruff formatting step to CI pipeline * [refactor] - Simplify the Ruff format command in the CI pipeline * Apply suggestion from @cclauss --------- Co-authored-by: Christian Clauss <cclauss@me.com>
1 parent 6a49107 commit 1abae00

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ jobs:
3636
- uses: actions/checkout@v5
3737
with:
3838
persist-credentials: false
39+
3940
- name: Run Ruff Linting 🧹
4041
uses: astral-sh/ruff-action@v3
41-
with:
42-
args: check
43-
src: "."
42+
43+
- name: Run Ruff Formatting 🧽
44+
run: ruff format --check .
4445

4546
test-regular:
4647
needs: ["ruff", "uv-lock-check"]

scheduler/tests/test_task_types/test_task_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def test_parse_kwargs(self):
231231
taskarg_factory(TaskKwarg, key="key3", arg_type="bool", val=True, content_object=task)
232232
taskarg_factory(TaskKwarg, key="key4", arg_type="datetime", val=date, content_object=task)
233233
kwargs = task.parse_kwargs()
234-
self.assertEqual(kwargs, {'key1': "one", 'key2': 2, 'key3': True, 'key4': date})
234+
self.assertEqual(kwargs, {"key1": "one", "key2": 2, "key3": True, "key4": date})
235235

236236
def test_callable_args_and_kwargs(self):
237237
task = task_factory(self.task_type, callable="scheduler.tests.jobs.test_args_kwargs")
@@ -418,7 +418,7 @@ def test_admin_single_delete(self):
418418
self.assertTrue(task.is_scheduled())
419419
prev_executions_count = len(_get_executions(task))
420420
url = reverse("admin:scheduler_task_delete", args=[task.pk])
421-
data = {'post': "yes"}
421+
data = {"post": "yes"}
422422
# act
423423
res = self.client.post(url, data=data, follow=True)
424424
# assert

0 commit comments

Comments
 (0)