Skip to content

Commit

Permalink
Lock file maintenance Python dependencies (#398)
Browse files Browse the repository at this point in the history
* Lock file maintenance Python dependencies

* Fix linting

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dragomir Penev <[email protected]>
  • Loading branch information
renovate[bot] and dragomirp authored Oct 31, 2024
1 parent 5e97352 commit 00406c9
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 36 deletions.
40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ opentelemetry-exporter-otlp-proto-http = "1.21.0"
optional = true

[tool.poetry.group.format.dependencies]
ruff = "^0.7.0"
ruff = "^0.7.1"

[tool.poetry.group.lint]
optional = true
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/helpers/ha_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ async def check_writes(ops_test, use_ip_from_inside: bool = False) -> int:
ops_test, use_ip_from_inside=use_ip_from_inside
)
for member, count in actual_writes.items():
assert (
count == max_number_written[member]
), f"{member}: writes to the db were missed: count of actual writes different from the max number written."
assert count == max_number_written[member], (
f"{member}: writes to the db were missed: count of actual writes different from the max number written."
)
assert total_expected_writes == count, f"{member}: writes to the db were missed."
return total_expected_writes

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/relations/pgbouncer_provider/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def build_connection_string(
a PostgreSQL connection string
"""
# Get the connection data exposed to the application through the relation.
database = f'{application_name.replace("-", "_")}_{relation_name.replace("-", "_")}'
database = f"{application_name.replace('-', '_')}_{relation_name.replace('-', '_')}"

if secret_uri := await get_application_relation_data(
ops_test,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ async def test_no_read_only_endpoint_in_standalone_cluster(ops_test: OpsTest):
]
unit = ops_test.model.applications[CLIENT_APP_NAME].units[0]
databag = await get_app_relation_databag(ops_test, unit.name, relations[0].id)
assert not databag.get(
"read-only-endpoints", None
), f"read-only-endpoints in pgb databag: {databag}"
assert not databag.get("read-only-endpoints", None), (
f"read-only-endpoints in pgb databag: {databag}"
)


@pytest.mark.group(1)
Expand All @@ -228,9 +228,9 @@ async def test_no_read_only_endpoint_in_scaled_up_cluster(ops_test: OpsTest):
]
unit = ops_test.model.applications[CLIENT_APP_NAME].units[0]
databag = await get_app_relation_databag(ops_test, unit.name, relations[0].id)
assert not databag.get(
"read-only-endpoints", None
), f"read-only-endpoints in pgb databag: {databag}"
assert not databag.get("read-only-endpoints", None), (
f"read-only-endpoints in pgb databag: {databag}"
)


@pytest.mark.group(1)
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/relations/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ async def test_extensions(ops_test: OpsTest, pgb_charm_jammy):
)
for attempt in Retrying(stop=stop_after_attempt(10), wait=wait_fixed(1), reraise=True):
with attempt:
assert (
len(ops_test.model.applications[PGB].units) == 0
), "pgb units were not removed"
assert len(ops_test.model.applications[PGB].units) == 0, (
"pgb units were not removed"
)

config = {"plugin_pg_trgm_enable": "True", "plugin_unaccent_enable": "True"}
await ops_test.model.applications[PG].set_config(config)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/relations/test_hacluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_set_vip(self, _is_clustered):
'migration-threshold=\\"INFINITY\\" '
'failure-timeout=\\"5s\\" op monitor '
'timeout=\\"20s\\" interval=\\"10s\\" depth=\\"0\\""}',
"json_resources": '{"res_pgbouncer_d716ce1885885a_vip": ' '"ocf:heartbeat:IPaddr2"}',
"json_resources": '{"res_pgbouncer_d716ce1885885a_vip": "ocf:heartbeat:IPaddr2"}',
}

# ipv6 address
Expand All @@ -96,7 +96,7 @@ def test_set_vip(self, _is_clustered):
'migration-threshold=\\"INFINITY\\" '
'failure-timeout=\\"5s\\" op monitor '
'timeout=\\"20s\\" interval=\\"10s\\" depth=\\"0\\""}',
"json_resources": '{"res_pgbouncer_61b6532057c944_vip": ' '"ocf:heartbeat:IPv6addr"}',
"json_resources": '{"res_pgbouncer_61b6532057c944_vip": "ocf:heartbeat:IPv6addr"}',
}

# unset data
Expand Down

0 comments on commit 00406c9

Please sign in to comment.