-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When using strict typing with Python, and trying to call function find or find_all, I receive the following typing error:
Cannot access attribute "find_all" for class "SubscriptionClient"
Could not bind method "find_all" because "SubscriptionClient" is not assignable to parameter "self"
"SubscriptionClient" is incompatible with protocol "_ClientMixin[SubscriptionResponse]"
"API_RESOURCE" is not defined as a ClassVar in protocol
"RESPONSE_MODEL" is not defined as a ClassVar in protocol
"ROOT_NAME" is not defined as a ClassVar in protocolPylance[reportAttributeAccessIssue](https://github.com/microsoft/pyright/blob/main/docs/configuration.md#reportAttributeAccessIssue)
To Reproduce
- Install
lago-python-client - Activate
stricttyping on Python - Paste the following code:
from lago_python_client.client import Client as LagoClient
lago_client = LagoClient(
api_url="https://api.lago.dev",
api_key="sk_test_1234567890",
)
subscriptions_api = lago_client.subscriptions()
lago_subscriptions = subscriptions_api.find_all()
You should see the following typing error:
Expected behavior
Output type from find_all should not be unknown, and actually be list[SubscriptionResponse]
Screenshots
See above
Support
- OS: macOS Sequoia - Version 15.5
- Browser: Chrome
- Version:
lago-python-client == 1.32.0
jlouazel and VernSul
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working