launchdarkly / python-server-sdk

LaunchDarkly Server-side SDK for Python
https://docs.launchdarkly.com/sdk/server-side/python
Other
38 stars 44 forks source link

TestData.__call__ does not line up with Config.__update_processor_class #273

Closed csapuntz closed 4 months ago

csapuntz commented 4 months ago

Describe the bug

Sample code in TestData says to:

   td = TestData.data_source()
   client = LDClient(config=Config('SDK_KEY', update_processor_class = td))

However update_processor_class: Optional[Callable[[str, 'Config', FeatureStore], UpdateProcessor]

and TestData.__call__ is:

def __call__(self, config, store, ready):

To reproduce Set up pylance in Visual Studio and see the type errors when you try the sample code.

Expected behavior No type errors, compatible function signatures.

Logs N/A

SDK version launchdarkly-server-sdk 9.2.1

Language version, developer tools Python 3.9

OS/platform Ubuntu 20.04

keelerm84 commented 4 months ago

Thank you for filing this issue with us. I will look into it and let you know once we have a resolution.

keelerm84 commented 4 months ago

Fixed in 9.2.2

Thanks again!