@@ -66,9 +66,8 @@ def use_multiplexed(self, transaction_type: TransactionType) -> bool:
6666 """
6767
6868 if transaction_type is TransactionType .READ_ONLY :
69- return (
70- self ._is_multiplexed_enabled [transaction_type ]
71- and self ._getenv (self .ENV_VAR_ENABLE_MULTIPLEXED )
69+ return self ._is_multiplexed_enabled [transaction_type ] and self ._getenv (
70+ self .ENV_VAR_ENABLE_MULTIPLEXED
7271 )
7372
7473 elif transaction_type is TransactionType .PARTITIONED :
@@ -80,7 +79,7 @@ def use_multiplexed(self, transaction_type: TransactionType) -> bool:
8079
8180 elif transaction_type is TransactionType .READ_WRITE :
8281 return False
83-
82+
8483 raise ValueError (f"Transaction type { transaction_type } is not supported." )
8584
8685 def disable_multiplexed (
@@ -104,11 +103,15 @@ def disable_multiplexed(
104103 if transaction_type is None :
105104 if logger :
106105 logger .warning (
107- disable_multiplexed_log_msg_fstring .format (transaction_type_value = "all" )
106+ disable_multiplexed_log_msg_fstring .format (
107+ transaction_type_value = "all"
108+ )
108109 )
109110 else :
110111 print (
111- disable_multiplexed_log_msg_fstring .format (transaction_type_value = "all" )
112+ disable_multiplexed_log_msg_fstring .format (
113+ transaction_type_value = "all"
114+ )
112115 )
113116 for transaction_type in TransactionType :
114117 self ._is_multiplexed_enabled [transaction_type ] = False
@@ -123,7 +126,9 @@ def disable_multiplexed(
123126 )
124127 else :
125128 print (
126- disable_multiplexed_log_msg_fstring .format (transaction_type_value = transaction_type .value )
129+ disable_multiplexed_log_msg_fstring .format (
130+ transaction_type_value = transaction_type .value
131+ )
127132 )
128133 self ._is_multiplexed_enabled [transaction_type ] = False
129134 return
@@ -137,4 +142,4 @@ def _getenv(name: str) -> bool:
137142 considered false.
138143 """
139144 env_var = os .getenv (name , "" ).lower ().strip ()
140- return env_var in ["1" , "true" ]
145+ return env_var in ["1" , "true" ]
0 commit comments