mirror of
https://github.com/neondatabase/neon.git
synced 2026-10-30 15:27:26 +00:00
python: more linting (#4734)
Ruff has "B" class of lints, including B018 which will nag on useless expressions, related to #4719. Enable such lints and fix the existing issues. Most notably: - https://beta.ruff.rs/docs/rules/mutable-argument-default/ - https://beta.ruff.rs/docs/rules/assert-false/ --------- Co-authored-by: Alexander Bayandin <alexander@neon.tech>
This commit is contained in:
co-authored by
Alexander Bayandin
parent
2e8a3afab1
commit
762a8a7bb5
@@ -77,8 +77,8 @@ def test_random_writes(neon_with_baseline: PgCompare):
|
||||
|
||||
# Update random keys
|
||||
with env.record_duration("run"):
|
||||
for it in range(n_iterations):
|
||||
for i in range(n_writes):
|
||||
for _ in range(n_iterations):
|
||||
for _ in range(n_writes):
|
||||
key = random.randint(1, n_rows)
|
||||
cur.execute(f"update Big set count=count+1 where pk={key}")
|
||||
env.flush()
|
||||
|
||||
Reference in New Issue
Block a user