Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy check complains Value of type "Any | Awaitable[Any]" is not indexable #242

Open
willshang76 opened this issue Oct 23, 2024 · 0 comments

Comments

@willshang76
Copy link

When I use the sync client like below

from notion_client import Client

self.notion_token = notion_token or os.environ.get("NOTION_TOKEN")

self.notion_client = Client(auth=self.notion_token)

response = self.notion_client.search(
    filter={"property": "object", "value": "page"},
    start_cursor=cursor,
)
all_pages_info.extend(response["results"])

The mypy check complains 'Value of type "Any | Awaitable[Any]" is not indexable' for the line response = self.notion_client.search and all_pages_info.extend(response["results"]).

I wonder how to solve this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant