Skip to content

Commit 3fa550d

Browse files
committed
Ignore invalid unreachable statement
1 parent 6f9cd56 commit 3fa550d

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

posthog/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def get_identity_state(passed) -> tuple[str, bool]:
9090
def add_context_tags(properties: Optional[Dict[str, Any]]) -> Dict[str, Any]:
9191
if properties is None:
9292
properties = {}
93-
93+
9494
current_context = _get_current_context()
9595
if current_context:
9696
context_tags = current_context.collect_tags()
@@ -1673,7 +1673,7 @@ def _compute_payload_locally(
16731673
if self.feature_flags_by_key is None:
16741674
return payload
16751675

1676-
flag_definition = self.feature_flags_by_key.get(key)
1676+
flag_definition = self.feature_flags_by_key.get(key) # type: ignore[unreachable]
16771677
if flag_definition:
16781678
flag_filters = flag_definition.get("filters") or {}
16791679
flag_payloads = flag_filters.get("payloads") or {}

posthog/feature_flags.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def match_flag_property(
441441

442442
if not dependency_id:
443443
return None
444-
444+
445445
# Validate expected_value type
446446
if not isinstance(expected_value, (bool, str)):
447447
log.warning(
@@ -826,7 +826,9 @@ def match_property_group(
826826
id_to_key,
827827
)
828828
elif prop.get("type") == "flag":
829-
flag_matches = match_flag_property(prop, dependency_graph, id_to_key)
829+
flag_matches = match_flag_property(
830+
prop, dependency_graph, id_to_key
831+
)
830832
if flag_matches is None:
831833
# Dependency not available, skip this condition
832834
log.warning(

0 commit comments

Comments
 (0)