Skip to content

Commit a2808c5

Browse files
committed
revert automated formatting changes
1 parent f9a276f commit a2808c5

File tree

1 file changed

+16
-40
lines changed

1 file changed

+16
-40
lines changed

ldclient/interfaces.py

Lines changed: 16 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ class FeatureStore:
3333
__metaclass__ = ABCMeta
3434

3535
@abstractmethod
36-
def get(
37-
self,
38-
kind: VersionedDataKind,
39-
key: str,
40-
callback: Callable[[Any], Any] = lambda x: x,
41-
) -> Any:
36+
def get(self, kind: VersionedDataKind, key: str, callback: Callable[[Any], Any] = lambda x: x) -> Any:
4237
"""
4338
Retrieves the object to which the specified key is mapped, or None if the key is not found
4439
or the associated object has a ``deleted`` property of True. The retrieved object, if any (a
@@ -51,9 +46,7 @@ def get(
5146
"""
5247

5348
@abstractmethod
54-
def all(
55-
self, kind: VersionedDataKind, callback: Callable[[Any], Any] = lambda x: x
56-
) -> Any:
49+
def all(self, kind: VersionedDataKind, callback: Callable[[Any], Any] = lambda x: x) -> Any:
5750
"""
5851
Retrieves a dictionary of all associated objects of a given kind. The retrieved dict of keys
5952
to objects can be transformed by the specified callback.
@@ -501,9 +494,7 @@ def add_listener(self, listener: Callable[[BigSegmentStoreStatus], None]) -> Non
501494
pass
502495

503496
@abstractmethod
504-
def remove_listener(
505-
self, listener: Callable[[BigSegmentStoreStatus], None]
506-
) -> None:
497+
def remove_listener(self, listener: Callable[[BigSegmentStoreStatus], None]) -> None:
507498
"""
508499
Unsubscribes from notifications of status changes.
509500
@@ -518,7 +509,7 @@ class DataSourceState(Enum):
518509
Enumeration representing the states a data source can be in at any given time.
519510
"""
520511

521-
INITIALIZING = "initializing"
512+
INITIALIZING = 'initializing'
522513
"""
523514
The initial state of the data source when the SDK is being initialized.
524515
@@ -527,7 +518,7 @@ class DataSourceState(Enum):
527518
becomes {OFF}.
528519
"""
529520

530-
VALID = "valid"
521+
VALID = 'valid'
531522
"""
532523
Indicates that the data source is currently operational and has not had any problems since the
533524
last time it received data.
@@ -537,7 +528,7 @@ class DataSourceState(Enum):
537528
request succeeded.
538529
"""
539530

540-
INTERRUPTED = "interrupted"
531+
INTERRUPTED = 'interrupted'
541532
"""
542533
Indicates that the data source encountered an error that it will attempt to recover from.
543534
@@ -546,7 +537,7 @@ class DataSourceState(Enum):
546537
request failed, and a new poll request will be made after the configured polling interval.
547538
"""
548539

549-
OFF = "off"
540+
OFF = 'off'
550541
"""
551542
Indicates that the data source has been permanently shut down.
552543
@@ -561,27 +552,27 @@ class DataSourceErrorKind(Enum):
561552
Enumeration representing the types of errors a data source can encounter.
562553
"""
563554

564-
UNKNOWN = "unknown"
555+
UNKNOWN = 'unknown'
565556
"""
566557
An unexpected error, such as an uncaught exception.
567558
"""
568559

569-
NETWORK_ERROR = "network_error"
560+
NETWORK_ERROR = 'network_error'
570561
"""
571562
An I/O error such as a dropped connection.
572563
"""
573564

574-
ERROR_RESPONSE = "error_response"
565+
ERROR_RESPONSE = 'error_response'
575566
"""
576567
The LaunchDarkly service returned an HTTP response with an error status.
577568
"""
578569

579-
INVALID_DATA = "invalid_data"
570+
INVALID_DATA = 'invalid_data'
580571
"""
581572
The SDK received malformed data from the LaunchDarkly service.
582573
"""
583574

584-
STORE_ERROR = "store_error"
575+
STORE_ERROR = 'store_error'
585576
"""
586577
The data source itself is working, but when it tried to put an update into the data store, the data
587578
store failed (so the SDK may not have the latest data).
@@ -596,13 +587,7 @@ class DataSourceErrorInfo:
596587
A description of an error condition that the data source encountered.
597588
"""
598589

599-
def __init__(
600-
self,
601-
kind: DataSourceErrorKind,
602-
status_code: int,
603-
time: float,
604-
message: Optional[str],
605-
):
590+
def __init__(self, kind: DataSourceErrorKind, status_code: int, time: float, message: Optional[str]):
606591
self.__kind = kind
607592
self.__status_code = status_code
608593
self.__time = time
@@ -642,12 +627,7 @@ class DataSourceStatus:
642627
Information about the data source's status and about the last status change.
643628
"""
644629

645-
def __init__(
646-
self,
647-
state: DataSourceState,
648-
state_since: float,
649-
last_error: Optional[DataSourceErrorInfo],
650-
):
630+
def __init__(self, state: DataSourceState, state_since: float, last_error: Optional[DataSourceErrorInfo]):
651631
self.__state = state
652632
self.__state_since = state_since
653633
self.__last_error = last_error
@@ -781,9 +761,7 @@ def delete(self, kind: VersionedDataKind, key: str, version: int):
781761
pass
782762

783763
@abstractmethod
784-
def update_status(
785-
self, new_state: DataSourceState, new_error: Optional[DataSourceErrorInfo]
786-
):
764+
def update_status(self, new_state: DataSourceState, new_error: Optional[DataSourceErrorInfo]):
787765
"""
788766
Informs the SDK of a change in the data source's status.
789767
@@ -912,9 +890,7 @@ def remove_listener(self, listener: Callable[[FlagChange], None]):
912890
pass
913891

914892
@abstractmethod
915-
def add_flag_value_change_listener(
916-
self, key: str, context: Context, listener: Callable[[FlagValueChange], None]
917-
):
893+
def add_flag_value_change_listener(self, key: str, context: Context, listener: Callable[[FlagValueChange], None]):
918894
"""
919895
Registers a listener to be notified of a change in a specific feature flag's value for a specific
920896
evaluation context.

0 commit comments

Comments
 (0)