- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 328
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Describe the bug
Note
This report was created having in consideration the instruction made by @silentworks in the thread https://discord.com/channels/839993398554656828/1323676367765897297.
When using the async client and calling the execute
method after an eq
filter, PyCharm generate an Unresolved attribute reference 'execute' for class 'BaseFilterRequestBuilder'
warning.
Exploring the source of the eq
method I figured out the class BaseFilterRequestBuilder
doesn't have a definition for the execute
method and doesn't extend any class which define it. In fact, there is no definition in the whole "base_request_builder.py" file (PyCharm word search).
On the other hand, the select
method is currently defined in AsyncRequestBuilder
and returns an instance of AsyncSelectRequestBuilder
(which extends AsyncQueryRequestBuilder
). This dependency chain correctly provide the execute
method definition.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Create and async client
from supabase import create_async_client
from app.env import env_vars
supabase = await create_async_client(
supabase_url=env_vars['SUPABASE_URL'],
supabase_key=env_vars['SUPABASE_KEY'],
)
- Create a select query to any table and schema:
result = await supabase.schema('stuff').table('regs').select().eq('key', key).execute()
- PyCharm generate a warning when calling the
execute()
method
Expected behavior
Call the execute
method after eq
without a warning.
Screenshots
System information
- OS: GNU/Linux Fedora 41 KDE Workstation
- Version of supabase: 2.11.0
- Version of Python: 3.13.0
- Version of Miniconda: 24.7.1
- Version of Poetry: 1.8.4 (installed with pipx)
Additional context
Using PyCharm Community 2024.3.1.1 (243.22562.220)
Activity
Glinte commentedon Jan 8, 2025
Seems to be something about:
where
type checkersPyCharm only pick up on the first parent, and could not findexecute()
thereThis is extremely annoying because my whole repo is drowned by warnings from
.execute()
/maybe_single()
/single()
and I can't see actual warnings from a glance. Maybe I should go back to VSCode...Relevant JetBrains YouTrack issue: https://youtrack.jetbrains.com/issue/PY-52886/Incorrect-Unresolved-attribute-reference-when-using-multiple-inheritance
Glinte commentedon Jan 8, 2025
Workaround: Install mypy or pyright, use their language server, and disable PyCharm's builtin "unresolved references" inspection

KBeDevel commentedon Jan 14, 2025
Now I'm not sure if this belongs here... I mean, this seems to be an issue with PyCharm itself and not supabase-py. Maybe, we should leave this issue open for tracking purposes.
silentworks commentedon Jan 14, 2025
@KBeDevel yeah lets leave this one open for now. I want to investigate it a bit, as the issue did show up in my VS Code at one point too.