@@ -207,7 +207,9 @@ def _get_config_value(name: str) -> t.Optional[str]:
207207
208208 current_replication = _get_config_value ("default_replication_num" )
209209 try :
210- current_replication_int = int (current_replication ) if current_replication is not None else None
210+ current_replication_int = (
211+ int (current_replication ) if current_replication is not None else None
212+ )
211213 except Exception :
212214 current_replication_int = None
213215
@@ -222,9 +224,7 @@ def _get_config_value(name: str) -> t.Optional[str]:
222224 current_replication ,
223225 )
224226 except Exception as e : # pragma: no cover - do not break tests if lacking privilege
225- logger .warning (
226- "Failed to set default_replication_num for shared_nothing cluster: %s" , e
227- )
227+ logger .warning ("Failed to set default_replication_num for shared_nothing cluster: %s" , e )
228228
229229
230230class TestBasicOperations :
@@ -249,10 +249,10 @@ def test_create_drop_schema(self, ctx: TestContext, engine_adapter: StarRocksEng
249249
250250 # DROP DATABASE
251251 engine_adapter .drop_schema (db_name )
252- result : t .Optional [Row ] = engine_adapter .fetchone (
252+ dropped_result : t .Optional [Row ] = engine_adapter .fetchone (
253253 f"SELECT SCHEMA_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '{ db_name } '"
254254 )
255- assert result is None , "DROP DATABASE failed"
255+ assert dropped_result is None , "DROP DATABASE failed"
256256
257257 def test_create_drop_table (self , ctx : TestContext , engine_adapter : StarRocksEngineAdapter ):
258258 """Test CREATE TABLE and DROP TABLE (TestContext version)."""
@@ -1491,8 +1491,9 @@ def test_e2e_partition_expression_for_table(
14911491 else :
14921492 assert "REGION" in after
14931493 if "FROM_UNIXTIME" in partition_expr .upper ():
1494- assert "FROM_UNIXTIME" in after or \
1495- ("FROM_UNIXTIME" in before and "__GENERATED_PARTITION_COLUMN" in after )
1494+ assert "FROM_UNIXTIME" in after or (
1495+ "FROM_UNIXTIME" in before and "__GENERATED_PARTITION_COLUMN" in after
1496+ )
14961497 if "DATE_TRUNC" in partition_expr .upper ():
14971498 assert "DATE_TRUNC" in after
14981499 finally :
@@ -1578,9 +1579,9 @@ def test_e2e_partition_expression_for_mv(
15781579 view_properties = model .physical_properties ,
15791580 )
15801581
1581- ddl = fetchone_or_fail (
1582- starrocks_adapter , f"SHOW CREATE MATERIALIZED VIEW { mv_table } "
1583- )[ 1 ]
1582+ ddl = fetchone_or_fail (starrocks_adapter , f"SHOW CREATE MATERIALIZED VIEW { mv_table } " )[
1583+ 1
1584+ ]
15841585 logger .info (f"Case 6B DDL:\n { ddl } " )
15851586 ddl_upper = ddl .upper ()
15861587 assert "PARTITION BY" in ddl_upper
0 commit comments