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

fix: update types for insert #187

Merged
merged 1 commit into from
Jan 26, 2023
Merged

fix: update types for insert #187

merged 1 commit into from
Jan 26, 2023

Conversation

J0
Copy link
Contributor

@J0 J0 commented Jan 23, 2023

fix #182, allow insert to support lists as well

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 23, 2023

Sourcery Code Quality Report

Merging this PR leaves code quality unchanged.

Quality metrics Before After Change
Complexity 1.30 ⭐ 1.30 ⭐ 0.00
Method Length 49.81 ⭐ 49.94 ⭐ 0.13 👎
Working memory 7.18 🙂 7.18 🙂 0.00
Quality 81.22% 81.22% 0.00%
Other metrics Before After Change
Lines 302 302 0
Changed files Quality Before Quality After Quality Change
postgrest/_async/request_builder.py 81.22% ⭐ 81.22% ⭐ 0.00%

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
postgrest/_async/request_builder.py AsyncRequestBuilder.insert 0 ⭐ 54 ⭐ 11 😞 73.95% 🙂 Extract out complex expressions
postgrest/_async/request_builder.py AsyncRequestBuilder.upsert 0 ⭐ 54 ⭐ 11 😞 73.95% 🙂 Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

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!

@codecov
Copy link

codecov bot commented Jan 23, 2023

Codecov Report

Base: 92.06% // Head: 92.06% // No change to project coverage 👍

Coverage data is based on head (280727a) compared to base (7e87364).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #187   +/-   ##
=======================================
  Coverage   92.06%   92.06%           
=======================================
  Files          23       23           
  Lines        1096     1096           
=======================================
  Hits         1009     1009           
  Misses         87       87           
Impacted Files Coverage Δ
postgrest/_async/request_builder.py 84.52% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@J0 J0 requested a review from anand2312 January 23, 2023 05:10
Copy link
Contributor

@anand2312 anand2312 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the minimum Python version we're supporting? In the future we might need a PR just adopting 3.10's new typing syntax like x | y for Union[x, y] but we can merge for now

@J0
Copy link
Contributor Author

J0 commented Jan 26, 2023

I think the min version is currently 3.7 on postgrest-py but we may want to bump that soon yeah

@J0 J0 merged commit 228fe53 into master Jan 26, 2023
@J0 J0 deleted the j0/update-insert branch January 26, 2023 01:40
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

Successfully merging this pull request may close these issues.

Typings disagree with bulk insert/upsert APIs
2 participants