File tree Expand file tree Collapse file tree 6 files changed +8
-8
lines changed
Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ class PSQLPyEngine(Engine[PostgresTransaction]):
352352 engine_type = "postgres"
353353 min_version_number = 10
354354
355- def __init__ ( # noqa: PLR0913
355+ def __init__ (
356356 self : Self ,
357357 config : dict [str , Any ],
358358 extensions : Sequence [str ] = ("uuid-ossp" ,),
@@ -441,7 +441,7 @@ def _parse_raw_version_string(version_string: str) -> float:
441441 '12.4 (Ubuntu 12.4-0ubuntu0.20.04.1)'. Just extract the major and
442442 minor version numbers.
443443 """
444- version_segment = version_string .split (" " )[0 ]
444+ version_segment = version_string .split (" " , maxsplit = 1 )[0 ]
445445 major , minor = version_segment .split ("." )[:2 ]
446446 return float (f"{ major } .{ minor } " )
447447
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ async def forwards() -> None:
301301 column_class_name = "Numeric" ,
302302 column_class = Numeric ,
303303 params = {
304- "default" : decimal .Decimal ("0" ),
304+ "default" : decimal .Decimal (0 ),
305305 "digits" : (5 , 2 ),
306306 "null" : False ,
307307 "primary_key" : False ,
Original file line number Diff line number Diff line change @@ -525,7 +525,7 @@ async def forwards() -> None:
525525 column_class_name = "Numeric" ,
526526 column_class = Numeric ,
527527 params = {
528- "default" : decimal .Decimal ("0" ),
528+ "default" : decimal .Decimal (0 ),
529529 "digits" : (5 , 2 ),
530530 "null" : False ,
531531 "primary_key" : False ,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def skip_test_extra_nodes() -> None:
1616 test_engine = engine_finder ()
1717 assert test_engine is not None
1818
19- test_engine = typing .cast (PSQLPyEngine , test_engine )
19+ test_engine = typing .cast (" PSQLPyEngine" , test_engine )
2020
2121 EXTRA_NODE : typing .Final = MagicMock (spec = PSQLPyEngine (config = test_engine .config )) # noqa: N806
2222 EXTRA_NODE .run_querystring = AsyncMock (return_value = [])
Original file line number Diff line number Diff line change 1111
1212
1313async def test_create_pool () -> None :
14- engine : typing .Final = typing .cast (PSQLPyEngine , Manager ._meta .db )
14+ engine : typing .Final = typing .cast (" PSQLPyEngine" , Manager ._meta .db )
1515
1616 await engine .start_connection_pool ()
1717 assert engine .pool is not None
@@ -45,7 +45,7 @@ async def get_data() -> None:
4545
4646
4747async def test_proxy_methods () -> None :
48- engine : typing .Final = typing .cast (PSQLPyEngine , Manager ._meta .db )
48+ engine : typing .Final = typing .cast (" PSQLPyEngine" , Manager ._meta .db )
4949
5050 # Deliberate typo ('nnn'):
5151 await engine .start_connnection_pool ()
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ async def get_transaction_ids() -> list[str]:
9393
9494async def test_transaction_exists () -> None :
9595 """Make sure we can detect when code is within a transaction."""
96- engine : typing .Final = typing .cast (PSQLPyEngine , Manager ._meta .db )
96+ engine : typing .Final = typing .cast (" PSQLPyEngine" , Manager ._meta .db )
9797
9898 async with engine .transaction ():
9999 assert engine .transaction_exists ()
You can’t perform that action at this time.
0 commit comments