@@ -66,9 +66,8 @@ def use_multiplexed(self, transaction_type: TransactionType) -> bool:
66
66
"""
67
67
68
68
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
72
71
)
73
72
74
73
elif transaction_type is TransactionType .PARTITIONED :
@@ -80,7 +79,7 @@ def use_multiplexed(self, transaction_type: TransactionType) -> bool:
80
79
81
80
elif transaction_type is TransactionType .READ_WRITE :
82
81
return False
83
-
82
+
84
83
raise ValueError (f"Transaction type { transaction_type } is not supported." )
85
84
86
85
def disable_multiplexed (
@@ -104,11 +103,15 @@ def disable_multiplexed(
104
103
if transaction_type is None :
105
104
if logger :
106
105
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
+ )
108
109
)
109
110
else :
110
111
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
+ )
112
115
)
113
116
for transaction_type in TransactionType :
114
117
self ._is_multiplexed_enabled [transaction_type ] = False
@@ -123,7 +126,9 @@ def disable_multiplexed(
123
126
)
124
127
else :
125
128
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
+ )
127
132
)
128
133
self ._is_multiplexed_enabled [transaction_type ] = False
129
134
return
@@ -137,4 +142,4 @@ def _getenv(name: str) -> bool:
137
142
considered false.
138
143
"""
139
144
env_var = os .getenv (name , "" ).lower ().strip ()
140
- return env_var in ["1" , "true" ]
145
+ return env_var in ["1" , "true" ]
0 commit comments