Skip to content

Commit ca27996

Browse files
committed
fix: fix ruff lint configuration
1 parent b74c5ea commit ca27996

File tree

8 files changed

+11
-13
lines changed

8 files changed

+11
-13
lines changed

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install dependencies and library
3232
run: poetry install
3333
- name: Check format
34-
run: poetry run ruff format -q
34+
run: poetry run ruff format --check
3535

3636
typing:
3737
runs-on: ubuntu-latest

scaleway-async/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ mypy = "^1.5.1"
3535
requires = ["poetry-core"]
3636
build-backend = "poetry.core.masonry.api"
3737

38-
[tool.ruff]
38+
[tool.ruff.lint]
3939
ignore = ["E501"]

scaleway-core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ mypy = "^1.5.1"
3737
requires = ["poetry-core"]
3838
build-backend = "poetry.core.masonry.api"
3939

40-
[tool.ruff]
40+
[tool.ruff.lint]
4141
ignore = ["E501"]

scaleway-core/scaleway_core/bridge/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@
4646
"unmarshal_TimeSeriesPoint",
4747
"marshal_TimeSeriesPoint",
4848
"unmarshal_Decimal",
49-
"marshal_Decimal"
49+
"marshal_Decimal",
5050
]

scaleway-core/scaleway_core/bridge/decimal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from decimal import Decimal
22
from typing import Any, Dict
33

4+
45
def unmarshal_Decimal(data: Any) -> Decimal:
56
"""
67
Unmarshal an instance of Decimal from the given data.
@@ -15,7 +16,6 @@ def unmarshal_Decimal(data: Any) -> Decimal:
1516
"Unmarshalling the type 'Decimal' failed as data does not contain a 'value' key."
1617
)
1718

18-
1919
return Decimal(data["value"])
2020

2121

scaleway-core/tests/test_bridge_marshal.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33

44
from scaleway_core.bridge import unmarshal_Decimal, marshal_Decimal
55

6+
67
class TestBridgeMarshal(unittest.TestCase):
78
def test_decimal_marshal(self):
8-
decimal = Decimal('1.2')
9-
self.assertEqual(marshal_Decimal(decimal), {'value': '1.2'})
9+
decimal = Decimal("1.2")
10+
self.assertEqual(marshal_Decimal(decimal), {"value": "1.2"})
1011

1112
def test_decimal_unmarshal(self):
12-
decimal = Decimal('1.2')
13-
self.assertEqual(unmarshal_Decimal({'value': '1.2'}), decimal)
13+
decimal = Decimal("1.2")
14+
self.assertEqual(unmarshal_Decimal({"value": "1.2"}), decimal)

scaleway/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ mypy = "^1.5.1"
3535
requires = ["poetry-core"]
3636
build-backend = "poetry.core.masonry.api"
3737

38-
[tool.ruff]
38+
[tool.ruff.lint]
3939
ignore = ["E501"]

scaleway/tests/test_total_count_legacy.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@
1111

1212

1313
class TestTotalCountLegacy(unittest.TestCase):
14-
1514
def setUp(self) -> None:
1615
self.client = Client()
1716
self.instance_api = InstanceV1API(self.client, bypass_validation=True)
1817

1918
def test_list_servers_type(self):
2019
list_server_type = self.instance_api.list_servers_types(zone="fr-par-1")
2120
self.assertIsNotNone(list_server_type.total_count)
22-
23-

0 commit comments

Comments
 (0)