Skip to content

Commit 0391e60

Browse files
author
Snapshot Budgets
committed
Fix mypy errors from D3.4 and the luma module split
The compare-and-swap snapshots are proven non-None before **unpacking. Event discovery now imports luma_events after luma.py was split.
1 parent 49b9f0c commit 0391e60

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎scripts/build_luma_event_identities.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def build(*, luma_source: Path) -> dict[str, Any]:
7979
EXISTING_EVENT_NONE,
8080
ExistingEventIndex,
8181
)
82-
from scripts.prod.registration_sources.luma import discover_luma_events
82+
from scripts.prod.registration_sources.luma_events import discover_luma_events
8383

8484
discovered = discover_luma_events(luma_source)
8585
index = ExistingEventIndex()

‎scripts/prod/account_reconciliation/__init__.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,7 @@ def _apply_one_mapping(
888888
identity_state=IdentityState.States.ABSORBED,
889889
)
890890
else:
891+
assert source_identity_snapshot is not None
891892
source_identity_updated = IdentityState.objects.filter(
892893
user_id=source.pk,
893894
**source_identity_snapshot,
@@ -933,6 +934,7 @@ def _apply_one_mapping(
933934
identity_state=IdentityState.States.ACTIVE,
934935
)
935936
else:
937+
assert survivor_identity_snapshot is not None
936938
survivor_identity_updated = IdentityState.objects.filter(
937939
user_id=survivor.pk,
938940
**survivor_identity_snapshot,
@@ -955,6 +957,7 @@ def _apply_one_mapping(
955957
if field in _LEARNER_PROFILE_FIELDS
956958
}
957959
if profile_updates:
960+
assert survivor_profile_snapshot is not None
958961
survivor_profile_updated = LearnerProfile.objects.filter(
959962
user_id=survivor.pk,
960963
**survivor_profile_snapshot,

0 commit comments

Comments
 (0)