chore: silence IDE0301 and redundant await linter warnings
Use static empty bundle grant lists in RewardRouterOperations; drop redundant await on synchronous GdUnit assert_signal in quest defs test.pull/182/head
parent
ee918c5412
commit
3a509d560e
|
|
@ -92,7 +92,7 @@ func test_request_sync_emits_definitions_ready() -> void:
|
|||
# Act
|
||||
c.call("request_sync_from_server")
|
||||
# Assert
|
||||
await assert_signal(c).is_emitted("definitions_ready", any())
|
||||
assert_signal(c).is_emitted("definitions_ready", any())
|
||||
assert_that(_quests_capture.size()).is_equal(4)
|
||||
assert_that(transport.last_url).contains("/quest-definitions")
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ public static class RewardRouterOperations
|
|||
private static readonly RewardItemGrantApplied[] EmptyItemGrants = [];
|
||||
private static readonly RewardSkillXpGrantApplied[] EmptySkillXpGrants = [];
|
||||
private static readonly RewardReputationGrantApplied[] EmptyReputationGrants = [];
|
||||
private static readonly IReadOnlyList<RewardGrantRow> EmptyBundleItemGrantRows = [];
|
||||
private static readonly IReadOnlyList<QuestSkillXpGrantRow> EmptyBundleSkillXpGrantRows = [];
|
||||
private static readonly IReadOnlyList<ReputationGrantRow> EmptyBundleReputationGrantRows = [];
|
||||
|
||||
/// <summary>
|
||||
/// Applies <paramref name="bundle"/> item, skill XP, and reputation rows for a quest completion and records
|
||||
|
|
@ -56,9 +59,9 @@ public static class RewardRouterOperations
|
|||
return SuccessFromEvent(existingEvent, RewardDeliveryReasonCodes.AlreadyDelivered);
|
||||
}
|
||||
|
||||
var itemGrants = bundle?.ItemGrants ?? [];
|
||||
var skillGrants = bundle?.SkillXpGrants ?? [];
|
||||
var reputationGrants = bundle?.ReputationGrants ?? [];
|
||||
var itemGrants = bundle?.ItemGrants ?? EmptyBundleItemGrantRows;
|
||||
var skillGrants = bundle?.SkillXpGrants ?? EmptyBundleSkillXpGrantRows;
|
||||
var reputationGrants = bundle?.ReputationGrants ?? EmptyBundleReputationGrantRows;
|
||||
var idempotencyKey = RewardDeliveryIds.MakeIdempotencyKey(normalizedPlayerId, normalizedQuestId);
|
||||
|
||||
if (itemGrants.Count > 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue