-
Notifications
You must be signed in to change notification settings - Fork 177
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
Add typed client options #96
Add typed client options #96
Conversation
I ran pre-commit on my end and everything is looking good. I did have to make a commit to fix all the line-endings. Setting
|
@joeriddles thanks for the contribution! Tests are failing, could you take a look whenever you have time, please? Thanks! |
@dreinon fixed the tests! Looks like they're passing on my machine. I'm not exactly sure what
|
@leynier @anand2312 can you review this too please? |
supabase/lib/client_options.py
Outdated
"""A storage provider. Used to store the logged in session.""" | ||
local_storage: Dict[str, Any] = dataclasses.field(default_factory=lambda: {}) | ||
|
||
"""Options passed to the realtime-js instance""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realtime-py?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Realtime-py?
Not sure I understand this comment. Is ClientOptions
missing some realtime_py values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing comment says realtime-js
, I'm guessing dreinon is asking you to change that to realtime-py
xfails are tests that are expected to fail, but xpasses are tests that are expected to fail but passed (which shouldn't be the case). Could you look into these cases too please @joeriddles? |
Well, actually, these xpasses are happening in a file this PR does not touch, so no worries about that. |
What I would actually like you to check is the two refactors sourcery proposes in PR #97, last commit. These cases are when variables are inmediately returned, sourcery asks you to return its value directly. |
Sure, made the changes, though one of sourcery's suggested changes was for part of a function I didn't touch. Regardless, made the small tweaks. |
Co-authored-by: Anand <[email protected]>
@anand2312 thanks for adding those type hints |
Perfect, so let's wait for @leynier 's review and then we'll ve ready to merge :) |
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.13%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
I also added |
LGTM! Thanks for the contribution @joeriddles |
Closes #50
This PR:
Client
options in the form ofClientOptions
.test.ps1
file that is equivalent totest.sh
, to more easily run tests on Windows.