Skip to content

Commit d9e7b00

Browse files
committed
ruff format .
1 parent 714411b commit d9e7b00

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

posthog/dependency_graph.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,15 @@ def match_flag_dependency(
236236
True
237237
>>> match_flag_dependency(True, False)
238238
False
239-
239+
240240
>>> # Boolean False filter matches only disabled state
241241
>>> match_flag_dependency(False, False)
242242
True
243243
>>> match_flag_dependency(False, True)
244244
False
245245
>>> match_flag_dependency(False, "variant-a")
246246
False
247-
247+
248248
>>> # String filter matches exact variant name
249249
>>> match_flag_dependency("variant-a", "variant-a")
250250
True
@@ -422,21 +422,23 @@ def evaluate_flags_with_dependencies(
422422
try:
423423
# Check if this is a group-level flag
424424
flag_filters = flag_def.get("filters", {})
425-
aggregation_group_type_index = flag_filters.get("aggregation_group_type_index")
426-
425+
aggregation_group_type_index = flag_filters.get(
426+
"aggregation_group_type_index"
427+
)
428+
427429
if aggregation_group_type_index is not None:
428430
# This is a group-level flag
429431
_groups = groups or {}
430432
_group_properties = group_properties or {}
431433
_group_type_mapping = group_type_mapping or {}
432-
434+
433435
group_name = _group_type_mapping.get(str(aggregation_group_type_index))
434436
if not group_name or group_name not in _groups:
435437
# Can't evaluate group flag without proper group info
436438
results[flag_key] = False
437439
dependency_graph.cache_result(flag_key, False)
438440
continue
439-
441+
440442
focused_group_properties = _group_properties.get(group_name, {})
441443
result = match_feature_flag_properties(
442444
flag_def,
@@ -456,7 +458,7 @@ def evaluate_flags_with_dependencies(
456458
dependency_graph,
457459
id_to_key,
458460
)
459-
461+
460462
results[flag_key] = result
461463
dependency_graph.cache_result(flag_key, result)
462464
except InconclusiveMatchError:

posthog/test/manual_integration/test_flag_dependencies.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ class FlagDependenciesIntegrationTest(unittest.TestCase):
167167
def setUpClass(cls):
168168
"""Set up the test environment."""
169169
# Configuration with environment variable overrides
170-
cls.API_KEY = os.environ.get(
171-
"POSTHOG_API_KEY", "YOUR_API_KEY_HERE"
172-
)
170+
cls.API_KEY = os.environ.get("POSTHOG_API_KEY", "YOUR_API_KEY_HERE")
173171
cls.FEATURE_FLAGS_API_KEY = os.environ.get(
174172
"POSTHOG_FEATURE_FLAGS_API_KEY",
175173
"YOUR_FEATURE_FLAGS_API_KEY_HERE",

0 commit comments

Comments
 (0)