-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
It looks like there are typing issue when I use polling_mode that is different from default AutoPollingMode
To reproduce
- Prepare a simple script that creates client with non-defaut
polling_mode(save it to file with nameconfigcat_issue.py)
import configcatclient
from configcatclient.configcatoptions import ConfigCatOptions
from configcatclient.pollingmode import PollingMode
client = configcatclient.get(
"my-key",
ConfigCatOptions(polling_mode=PollingMode.lazy_load()),
)
client.close()- Run type checker(for example
pyright)
pyright configcat_issue.py
- There is an error in output
/.../configcat_issue.py
/.../configcat_issue.py:7:35 - error: Argument of type "LazyLoadingMode" cannot be assigned to parameter "polling_mode" of type "AutoPollingMode" in function "__init__"
"LazyLoadingMode" is not assignable to "AutoPollingMode" (reportArgumentType)
1 error, 0 warnings, 0 informations
Expected behavior
Type checker shouldn't have any errors on given script
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working