@@ -299,11 +299,14 @@ def temp_database(*args, **kwargs) -> Connection:
299299class TPB : # pylint: disable=R0902
300300 """Transaction Parameter Buffer.
301301 """
302- def __init__ (self , * , access_mode : TraAccessMode = TraAccessMode .WRITE ,
303- isolation : Isolation = Isolation .SNAPSHOT ,
304- lock_timeout : int = - 1 , no_auto_undo : bool = False ,
305- auto_commit : bool = False , ignore_limbo : bool = False ,
306- at_snapshot_number : int = None , encoding : str = 'ascii' ):
302+ def __init__ (self , * , access_mode : TraAccessMode = TraAccessMode .WRITE ,
303+ isolation : Isolation = Isolation .SNAPSHOT ,
304+ lock_timeout : int = - 1 ,
305+ no_auto_undo : bool = False ,
306+ auto_commit : bool = False ,
307+ ignore_limbo : bool = False ,
308+ at_snapshot_number : int = None ,
309+ encoding : str = 'ascii' ):
307310 self .encoding : str = encoding
308311 self .access_mode : TraAccessMode = access_mode
309312 self .isolation : Isolation = isolation
@@ -2441,7 +2444,8 @@ def begin(self, tpb: bytes=None) -> None: # pylint: disable=W0621
24412444 """
24422445 assert not self .__closed
24432446 self ._finish () # Make sure that previous transaction (if any) is ended
2444- self ._tra = self ._connection ()._att .start_transaction (tpb or self .default_tpb )
2447+ self ._tra = self ._connection ()._att .start_transaction (self .default_tpb if tpb is None
2448+ else tpb )
24452449 def commit (self , * , retaining : bool = False ) -> None :
24462450 """Commits the transaction managed by this instance.
24472451
0 commit comments