Skip to content

Commit 682be05

Browse files
author
AntoniaSzecsi
committed
fix: use ruff formatter instead of black
1 parent e010342 commit 682be05

File tree

5 files changed

+11
-95
lines changed

5 files changed

+11
-95
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ check-security:
4545

4646
.PHONY: format
4747
format:
48-
poetry run black awslambdaric/ tests/
48+
poetry run ruff format awslambdaric/ tests/
4949

5050
.PHONY: check-format
5151
check-format:
52-
poetry run black --check awslambdaric/ tests/
52+
poetry run ruff format --check awslambdaric/ tests/
5353

5454
.PHONY: dev
5555
dev: init test

poetry.lock

Lines changed: 1 addition & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ parameterized = ">=0.9.0"
2020
ruff = "^0.1.0"
2121
bandit = "^1.7.5"
2222
pre-commit = "^3.0.0"
23-
black = "^23.0.0"
2423

2524
# Development scripts
2625
[tool.poetry.scripts]

scripts/dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def lint():
3232

3333
def format_code():
3434
print("Formatting code")
35-
run(["poetry", "run", "black", "awslambdaric/", "tests/"])
35+
run(["poetry", "run", "ruff", "format", "awslambdaric/", "tests/"])
3636

3737

3838
def clean():

tests/test_bootstrap.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -949,10 +949,13 @@ def test_binary_with_application_json(self):
949949
self.lambda_runtime.post_invocation_error.assert_called_once()
950950

951951
(
952-
invoke_id,
953-
error_result,
954-
xray_fault,
955-
), _ = self.lambda_runtime.post_invocation_error.call_args
952+
(
953+
invoke_id,
954+
error_result,
955+
xray_fault,
956+
),
957+
_,
958+
) = self.lambda_runtime.post_invocation_error.call_args
956959
error_dict = json.loads(error_result)
957960

958961
self.assertEqual("invoke-id", invoke_id)

0 commit comments

Comments
 (0)