Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Conversation

@J0
Copy link
Contributor

@J0 J0 commented Dec 14, 2022

What kind of change does this PR introduce?

cherry-picks the great work done by @leynier in #148

Moves over only the admin bindings (sans mfa)

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 14, 2022

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 0.76%.

Quality metrics Before After Change
Complexity 2.55 ⭐ 3.28 ⭐ 0.73 👎
Method Length 52.74 ⭐ 52.50 ⭐ -0.24 👍
Working memory 6.48 🙂 6.27 🙂 -0.21 👍
Quality 78.22% 77.46% -0.76% 👎
Other metrics Before After Change
Lines 2960 1790 -1170
Changed files Quality Before Quality After Quality Change
gotrue/__init__.py 88.24% ⭐ 88.24% ⭐ 0.00%
gotrue/helpers.py 97.50% ⭐ 85.38% ⭐ -12.12% 👎
gotrue/_async/client.py 71.91% 🙂 72.16% 🙂 0.25% 👍
gotrue/_sync/client.py 72.17% 🙂 72.42% 🙂 0.25% 👍
tests/_async/test_api_with_auto_confirm_disabled.py 92.69% ⭐ 92.69% ⭐ 0.00%
tests/_async/test_api_with_auto_confirm_enabled.py 88.51% ⭐ 88.56% ⭐ 0.05% 👍
tests/_async/test_client_with_sign_ups_disabled.py 78.82% ⭐ 78.82% ⭐ 0.00%
tests/_sync/test_api_with_auto_confirm_disabled.py 92.80% ⭐ 92.80% ⭐ 0.00%
tests/_sync/test_api_with_auto_confirm_enabled.py 88.65% ⭐ 88.71% ⭐ 0.06% 👍
tests/_sync/test_client_with_sign_ups_disabled.py 78.94% ⭐ 78.94% ⭐ 0.00%

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

File Function Complexity Length Working Memory Quality Recommendation
gotrue/_async/client.py AsyncGoTrueClient.get_session_from_url 15 🙂 252 ⛔ 13 😞 35.91% 😞 Try splitting into smaller methods. Extract out complex expressions
gotrue/_sync/client.py SyncGoTrueClient.get_session_from_url 15 🙂 250 ⛔ 13 😞 36.01% 😞 Try splitting into smaller methods. Extract out complex expressions
gotrue/_async/client.py AsyncGoTrueClient.sign_in 11 🙂 147 😞 13 😞 47.42% 😞 Try splitting into smaller methods. Extract out complex expressions
gotrue/_sync/client.py SyncGoTrueClient.sign_in 11 🙂 140 😞 13 😞 48.19% 😞 Try splitting into smaller methods. Extract out complex expressions
gotrue/_async/client.py AsyncGoTrueClient.__init__ 3 ⭐ 111 🙂 17 ⛔ 54.55% 🙂 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 Dec 14, 2022

Codecov Report

Base: 84.46% // Head: 82.42% // Decreases project coverage by -2.05% ⚠️

Coverage data is based on head (34141a8) compared to base (2217833).
Patch coverage: 3.70% of modified lines in pull request are covered.

❗ Current head 34141a8 differs from pull request most recent head a0ebbac. Consider uploading reports for the commit a0ebbac to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #196      +/-   ##
==========================================
- Coverage   84.46%   82.42%   -2.05%     
==========================================
  Files          14       18       +4     
  Lines        1056     1081      +25     
==========================================
- Hits          892      891       -1     
- Misses        164      190      +26     
Impacted Files Coverage Δ
gotrue/_async/gotrue_admin_mfa_api.py 0.00% <0.00%> (ø)
gotrue/_async/gotrue_mfa_api.py 0.00% <0.00%> (ø)
gotrue/_sync/client.py 89.49% <ø> (ø)
gotrue/_sync/gotrue_admin_mfa_api.py 0.00% <0.00%> (ø)
gotrue/_sync/gotrue_mfa_api.py 0.00% <0.00%> (ø)
gotrue/_sync/api.py 69.82% <100.00%> (-0.18%) ⬇️

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.

…indings

feat: add MFA bindings (Sourcery refactored)
@J0 J0 changed the title feat: add MFA bindings feat: add admin bindings Jan 22, 2023
@J0
Copy link
Contributor Author

J0 commented Jan 27, 2023

Closing in favour of merging #148

@J0 J0 closed this Jan 27, 2023
@leynier leynier deleted the j0/add_mfa_bindings branch January 29, 2023 12:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants