Skip to content

Commit 7cee266

Browse files
committed
Fixing formatting issues
1 parent 4077341 commit 7cee266

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

ldclient/impl/integrations/test_datav2/test_data_sourcev2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import threading
2-
import time
32
from queue import Empty, Queue
43
from typing import Generator
54

ldclient/integrations/test_datav2.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class FlagRuleBuilderV2:
3737

3838
def __init__(self, flag_builder: FlagBuilderV2):
3939
self._flag_builder = flag_builder
40-
self._clauses = [] # type: List[dict]
41-
self._variation = None # type: Optional[int]
40+
self._clauses: List[dict] = []
41+
self._variation: Optional[int] = None
4242

4343
def and_match(self, attribute: str, *values) -> FlagRuleBuilderV2:
4444
"""
@@ -170,11 +170,11 @@ def __init__(self, key: str):
170170
""":param str key: The name of the flag"""
171171
self._key = key
172172
self._on = True
173-
self._variations = [] # type: List[Any]
174-
self._off_variation = None # type: Optional[int]
175-
self._fallthrough_variation = None # type: Optional[int]
176-
self._targets = {} # type: Dict[str, Dict[int, Set[str]]]
177-
self._rules = [] # type: List[FlagRuleBuilderV2]
173+
self._variations: List[Any] = []
174+
self._off_variation: Optional[int] = None
175+
self._fallthrough_variation: Optional[int] = None
176+
self._targets: Dict[str, Dict[int, Set[str]]] = {}
177+
self._rules: List[FlagRuleBuilderV2] = []
178178

179179
# Note that _copy is private by convention, because we don't want developers to
180180
# consider it part of the public API, but it is still called from TestDataV2.
@@ -703,4 +703,4 @@ def build_synchronizer(self) -> _TestDataSourceV2:
703703
704704
:return: a test data synchronizer
705705
"""
706-
return _TestDataSourceV2(self)
706+
return _TestDataSourceV2(self)

ldclient/testing/integrations/test_test_data_sourcev2.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import pytest
66

7-
from ldclient.context import Context
87
from ldclient.impl.datasystem.protocolv2 import (
98
ChangeType,
109
IntentCode,
@@ -399,10 +398,10 @@ def test_initializer_can_sync():
399398
"""Test that an initializer can call sync() and get initial data"""
400399
td = TestDataV2.data_source()
401400
td.update(td.flag('test-flag').variation_for_all(True))
402-
401+
403402
initializer = td.build_initializer()
404403
sync_gen = initializer.sync()
405-
404+
406405
# Should get initial update with data
407406
initial_update = next(sync_gen)
408407
assert initial_update.state == DataSourceState.VALID

0 commit comments

Comments
 (0)