From d476e45fbabe1a8fae23e75ec7d38bc34452cab9 Mon Sep 17 00:00:00 2001 From: "Brent E. Edwards" Date: Wed, 18 Feb 2026 02:17:58 +0000 Subject: [PATCH] style(ruff-format): fix one unformatted file --- features/steps/resource_repository_steps.py | 90 ++++++++++----------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/features/steps/resource_repository_steps.py b/features/steps/resource_repository_steps.py index a16f60fb7..b608db2bc 100644 --- a/features/steps/resource_repository_steps.py +++ b/features/steps/resource_repository_steps.py @@ -183,9 +183,9 @@ def step_rt_persisted_name(context: Context, name: str) -> None: @then('a DuplicateResourceTypeError should be raised mentioning "{name}"') def step_dup_rt_error(context: Context, name: str) -> None: - assert isinstance( - context.repo_error, DuplicateResourceTypeError - ), f"Expected DuplicateResourceTypeError, got {type(context.repo_error)}" + assert isinstance(context.repo_error, DuplicateResourceTypeError), ( + f"Expected DuplicateResourceTypeError, got {type(context.repo_error)}" + ) assert name in str(context.repo_error) @@ -245,16 +245,16 @@ def step_list_rts_by_addable(context: Context, flag: str) -> None: @then("the resource type list should have {count:d} entries") def step_rt_list_count(context: Context, count: int) -> None: - assert ( - len(context.rt_list) == count - ), f"Expected {count} entries, got {len(context.rt_list)}" + assert len(context.rt_list) == count, ( + f"Expected {count} entries, got {len(context.rt_list)}" + ) @then('the first resource type in the list should be "{name}"') def step_rt_list_first(context: Context, name: str) -> None: - assert ( - context.rt_list[0].name == name - ), f"Expected first entry '{name}', got '{context.rt_list[0].name}'" + assert context.rt_list[0].name == name, ( + f"Expected first entry '{name}', got '{context.rt_list[0].name}'" + ) # ── ResourceTypeRepository: Update ──────────────────────────── @@ -284,9 +284,9 @@ def step_update_rt_desc(context: Context, desc: str) -> None: def step_rt_has_desc(context: Context, desc: str) -> None: result = context.rt_repo.get(context.rt_spec.name) assert result is not None - assert ( - result.description == desc - ), f"Expected description '{desc}', got '{result.description}'" + assert result.description == desc, ( + f"Expected description '{desc}', got '{result.description}'" + ) @when('a non-existent resource type "{name}" is updated') @@ -301,9 +301,9 @@ def step_update_nonexistent_rt(context: Context, name: str) -> None: @then("a ResourceTypeNotFoundError should be raised") def step_rt_not_found_error(context: Context) -> None: - assert isinstance( - context.repo_error, ResourceTypeNotFoundError - ), f"Expected ResourceTypeNotFoundError, got {type(context.repo_error)}" + assert isinstance(context.repo_error, ResourceTypeNotFoundError), ( + f"Expected ResourceTypeNotFoundError, got {type(context.repo_error)}" + ) # ── ResourceTypeRepository: Delete ──────────────────────────── @@ -326,9 +326,9 @@ def step_rt_delete_true(context: Context) -> None: @then("the resource type deletion should return false") def step_rt_delete_false(context: Context) -> None: - assert ( - context.delete_result is False - ), f"Expected False, got {context.delete_result}" + assert context.delete_result is False, ( + f"Expected False, got {context.delete_result}" + ) @then('the resource type "{name}" should no longer exist') @@ -345,9 +345,9 @@ def step_resource_of_type_exists(context: Context, type_name: str) -> None: @then("a ResourceTypeHasResourcesError should be raised") def step_rt_has_resources_error(context: Context) -> None: - assert isinstance( - context.repo_error, ResourceTypeHasResourcesError - ), f"Expected ResourceTypeHasResourcesError, got {type(context.repo_error)}" + assert isinstance(context.repo_error, ResourceTypeHasResourcesError), ( + f"Expected ResourceTypeHasResourcesError, got {type(context.repo_error)}" + ) # ── ResourceRepository: Create ──────────────────────────────── @@ -396,9 +396,9 @@ def step_res_persisted_name(context: Context, name: str) -> None: @then('a ResourceTypeNotFoundError should be raised for type "{type_name}"') def step_rt_not_found_for_type(context: Context, type_name: str) -> None: - assert isinstance( - context.repo_error, ResourceTypeNotFoundError - ), f"Expected ResourceTypeNotFoundError, got {type(context.repo_error)}" + assert isinstance(context.repo_error, ResourceTypeNotFoundError), ( + f"Expected ResourceTypeNotFoundError, got {type(context.repo_error)}" + ) assert type_name in str(context.repo_error) @@ -438,9 +438,9 @@ def step_save_dup_res(context: Context, name: str) -> None: @then('a DuplicateResourceError should be raised mentioning "{name}"') def step_dup_res_error(context: Context, name: str) -> None: - assert isinstance( - context.repo_error, DuplicateResourceError - ), f"Expected DuplicateResourceError, got {type(context.repo_error)}" + assert isinstance(context.repo_error, DuplicateResourceError), ( + f"Expected DuplicateResourceError, got {type(context.repo_error)}" + ) assert name in str(context.repo_error) @@ -526,9 +526,9 @@ def step_two_rts_for_res(context: Context, name1: str, name2: str) -> None: @then("the resource list should have {count:d} entries") def step_res_list_count(context: Context, count: int) -> None: - assert ( - len(context.res_list) == count - ), f"Expected {count} entries, got {len(context.res_list)}" + assert len(context.res_list) == count, ( + f"Expected {count} entries, got {len(context.res_list)}" + ) # ── ResourceRepository: Update ──────────────────────────────── @@ -558,9 +558,9 @@ def step_update_res_desc(context: Context, desc: str) -> None: def step_res_has_desc(context: Context, desc: str) -> None: result = context.res_repo.get(context.last_saved_resource.resource_id) assert result is not None - assert ( - result.description == desc - ), f"Expected description '{desc}', got '{result.description}'" + assert result.description == desc, ( + f"Expected description '{desc}', got '{result.description}'" + ) @when('a non-existent resource with ULID "{ulid}" is updated') @@ -579,9 +579,9 @@ def step_update_nonexistent_res(context: Context, ulid: str) -> None: @then("a ResourceNotFoundRepoError should be raised") def step_res_not_found_error(context: Context) -> None: - assert isinstance( - context.repo_error, ResourceNotFoundRepoError - ), f"Expected ResourceNotFoundRepoError, got {type(context.repo_error)}" + assert isinstance(context.repo_error, ResourceNotFoundRepoError), ( + f"Expected ResourceNotFoundRepoError, got {type(context.repo_error)}" + ) # ── ResourceRepository: Delete ──────────────────────────────── @@ -605,9 +605,9 @@ def step_res_delete_true(context: Context) -> None: @then("the resource deletion should return false") def step_res_delete_false(context: Context) -> None: - assert ( - context.delete_result is False - ), f"Expected False, got {context.delete_result}" + assert context.delete_result is False, ( + f"Expected False, got {context.delete_result}" + ) @then("the resource should no longer exist") @@ -669,9 +669,9 @@ def step_delete_parent_res(context: Context) -> None: @then("a ResourceHasEdgesError should be raised") def step_res_has_edges_error(context: Context) -> None: - assert isinstance( - context.repo_error, ResourceHasEdgesError - ), f"Expected ResourceHasEdgesError, got {type(context.repo_error)}" + assert isinstance(context.repo_error, ResourceHasEdgesError), ( + f"Expected ResourceHasEdgesError, got {type(context.repo_error)}" + ) # ── ResourceRepository: resolve_namespaced_name ─────────────── @@ -690,9 +690,9 @@ def step_resolved_has_name(context: Context, name: str) -> None: @then("no resolved resource should be returned") def step_no_resolved_res(context: Context) -> None: - assert ( - context.resolved_result is None - ), f"Expected None, got {context.resolved_result}" + assert context.resolved_result is None, ( + f"Expected None, got {context.resolved_result}" + ) @given("a resource with known ULID has been saved for resolve test")