Make ruff happy

This commit is contained in:
Konstantin Knizhnik
2025-05-30 07:58:29 +03:00
parent af0b3db6a0
commit 1c4a851549
2 changed files with 6 additions and 5 deletions

View File

@@ -616,7 +616,8 @@ impl Endpoint {
/// Map safekeepers ids to the actual connection strings.
fn build_safekeepers_connstrs(&self, sk_ids: Vec<NodeId>) -> Result<Vec<String>> {
sk_ids.into_iter()
sk_ids
.into_iter()
.map(|node_id| {
self.env
.safekeepers

View File

@@ -5,9 +5,8 @@ This far, only contains a test that we don't break and that the data is persiste
"""
import psycopg2
from fixtures.log_helper import log
from fixtures.neon_fixtures import Endpoint, NeonEnv, wait_replica_caughtup, wait_for_last_flush_lsn
from fixtures.neon_fixtures import Endpoint, NeonEnv, wait_for_last_flush_lsn, wait_replica_caughtup
from fixtures.pg_version import PgVersion
from pytest import raises
@@ -80,7 +79,9 @@ def test_replica_promotes(neon_simple_env: NeonEnv, pg_version: PgVersion):
new_primary_cur.execute("select count(*) from t")
assert new_primary_cur.fetchone() == (100,)
new_primary_cur.execute("INSERT INTO t (payload) SELECT generate_series(101, 200) RETURNING payload")
new_primary_cur.execute(
"INSERT INTO t (payload) SELECT generate_series(101, 200) RETURNING payload"
)
assert new_primary_cur.fetchall() == [(it,) for it in range(101, 201)]
new_primary_cur = new_primary_conn.cursor()
@@ -98,7 +99,6 @@ def test_replica_promotes(neon_simple_env: NeonEnv, pg_version: PgVersion):
)
log.info(f"Secondary: LSN after workload is {new_primary_cur.fetchone()}")
with secondary.connect() as second_viewpoint_conn:
new_primary_cur = second_viewpoint_conn.cursor()
new_primary_cur.execute("select payload from t")