Skip to content

Commit 785754c

Browse files
committed
chore: apply linting rules to updated tests
1 parent 2784c96 commit 785754c

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

tests/integration/test_adapters/test_adbc/test_null_params.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ def adbc_postgresql_null_session(postgres_service: PostgresService) -> Generator
4040
@xfail_if_driver_missing
4141
def test_postgresql_single_null_parameter(adbc_postgresql_null_session: AdbcDriver) -> None:
4242
"""Test executing with a single NULL parameter."""
43-
result = adbc_postgresql_null_session.execute(
44-
"INSERT INTO test_null_params (col1) VALUES ($1)", None
45-
)
43+
result = adbc_postgresql_null_session.execute("INSERT INTO test_null_params (col1) VALUES ($1)", None)
4644
assert result.rows_affected in (-1, 1)
4745

4846
# Verify data
@@ -56,8 +54,7 @@ def test_postgresql_single_null_parameter(adbc_postgresql_null_session: AdbcDriv
5654
def test_postgresql_all_null_parameters(adbc_postgresql_null_session: AdbcDriver) -> None:
5755
"""Test executing with all NULL parameters."""
5856
result = adbc_postgresql_null_session.execute(
59-
"INSERT INTO test_null_params (col1, col2, col3) VALUES ($1, $2, $3)",
60-
None, None, None
57+
"INSERT INTO test_null_params (col1, col2, col3) VALUES ($1, $2, $3)", None, None, None
6158
)
6259
assert result.rows_affected in (-1, 1)
6360

@@ -74,8 +71,7 @@ def test_postgresql_all_null_parameters(adbc_postgresql_null_session: AdbcDriver
7471
def test_postgresql_mixed_null_parameters(adbc_postgresql_null_session: AdbcDriver) -> None:
7572
"""Test executing with mixed NULL and non-NULL parameters."""
7673
result = adbc_postgresql_null_session.execute(
77-
"INSERT INTO test_null_params (col1, col2, col3) VALUES ($1, $2, $3)",
78-
"value1", None, "value3"
74+
"INSERT INTO test_null_params (col1, col2, col3) VALUES ($1, $2, $3)", "value1", None, "value3"
7975
)
8076
assert result.rows_affected in (-1, 1)
8177

@@ -99,15 +95,12 @@ def test_postgresql_execute_many_with_nulls(adbc_postgresql_null_session: AdbcDr
9995
]
10096

10197
result = adbc_postgresql_null_session.execute_many(
102-
"INSERT INTO test_null_params (col1, col2, col3) VALUES ($1, $2, $3)",
103-
parameters
98+
"INSERT INTO test_null_params (col1, col2, col3) VALUES ($1, $2, $3)", parameters
10499
)
105100
assert result.rows_affected in (-1, 4, 1)
106101

107102
# Verify data
108-
result = adbc_postgresql_null_session.execute(
109-
"SELECT * FROM test_null_params ORDER BY id"
110-
)
103+
result = adbc_postgresql_null_session.execute("SELECT * FROM test_null_params ORDER BY id")
111104
assert len(result.data) == 4
112105

113106
# Check each row

tests/unit/test_adapters/test_adbc/test_transformers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_adbc_postgres_transformer_empty_params() -> None:
1717
initial_sql_string=sql,
1818
dialect="postgres",
1919
config=config,
20-
merged_parameters=[] # Empty parameter list
20+
merged_parameters=[], # Empty parameter list
2121
)
2222

2323
transformer = AdbcPostgresTransformer()
@@ -41,7 +41,7 @@ def test_adbc_postgres_transformer_all_null_params() -> None:
4141
initial_sql_string=sql,
4242
dialect="postgres",
4343
config=config,
44-
merged_parameters=[None, None, None] # All NULL parameters
44+
merged_parameters=[None, None, None], # All NULL parameters
4545
)
4646

4747
transformer = AdbcPostgresTransformer()
@@ -71,7 +71,7 @@ def test_adbc_postgres_transformer_mixed_params() -> None:
7171
initial_sql_string=sql,
7272
dialect="postgres",
7373
config=config,
74-
merged_parameters=["value1", None] # Mixed parameters
74+
merged_parameters=["value1", None], # Mixed parameters
7575
)
7676

7777
transformer = AdbcPostgresTransformer()
@@ -102,7 +102,7 @@ def test_adbc_postgres_transformer_dict_params_all_null() -> None:
102102
initial_sql_string=sql,
103103
dialect="postgres",
104104
config=config,
105-
merged_parameters={"param1": None, "param2": None} # All NULL dict params
105+
merged_parameters={"param1": None, "param2": None}, # All NULL dict params
106106
)
107107

108108
transformer = AdbcPostgresTransformer()
@@ -124,7 +124,7 @@ def test_adbc_postgres_transformer_complex_mixed_nulls() -> None:
124124
initial_sql_string=sql,
125125
dialect="postgres",
126126
config=config,
127-
merged_parameters=["value1", None, "value3", None, "value5"] # Mixed NULLs
127+
merged_parameters=["value1", None, "value3", None, "value5"], # Mixed NULLs
128128
)
129129

130130
transformer = AdbcPostgresTransformer()

0 commit comments

Comments
 (0)