File tree Expand file tree Collapse file tree 8 files changed +11
-13
lines changed Expand file tree Collapse file tree 8 files changed +11
-13
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -35,5 +35,5 @@ mypy = "^1.5.1"
3535requires = [" poetry-core" ]
3636build-backend = " poetry.core.masonry.api"
3737
38- [tool .ruff ]
38+ [tool .ruff . lint ]
3939ignore = [" E501" ]
Original file line number Diff line number Diff line change @@ -37,5 +37,5 @@ mypy = "^1.5.1"
3737requires = [" poetry-core" ]
3838build-backend = " poetry.core.masonry.api"
3939
40- [tool .ruff ]
40+ [tool .ruff . lint ]
4141ignore = [" E501" ]
Original file line number Diff line number Diff line change 4646 "unmarshal_TimeSeriesPoint" ,
4747 "marshal_TimeSeriesPoint" ,
4848 "unmarshal_Decimal" ,
49- "marshal_Decimal"
49+ "marshal_Decimal" ,
5050]
Original file line number Diff line number Diff line change 11from decimal import Decimal
22from typing import Any , Dict
33
4+
45def 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
Original file line number Diff line number Diff line change 33
44from scaleway_core .bridge import unmarshal_Decimal , marshal_Decimal
55
6+
67class 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 )
Original file line number Diff line number Diff line change @@ -35,5 +35,5 @@ mypy = "^1.5.1"
3535requires = [" poetry-core" ]
3636build-backend = " poetry.core.masonry.api"
3737
38- [tool .ruff ]
38+ [tool .ruff . lint ]
3939ignore = [" E501" ]
Original file line number Diff line number Diff line change 1111
1212
1313class 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-
You can’t perform that action at this time.
0 commit comments