-
-
Notifications
You must be signed in to change notification settings - Fork 53
fix: delete_user returns Exception event if response is Ok (Sourcery refactored) #69
Conversation
| self.headers = headers | ||
| self.cookie_options = cookie_options | ||
| self.http_client = http_client if http_client else AsyncClient() | ||
| self.http_client = http_client or AsyncClient() |
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.
Function AsyncGoTrueAPI.__init__ refactored with the following changes:
- Simplify if expression by using or (
or-if-exp-identity)
| data = {"phone": phone, "password": password} | ||
| url = f"{self.url}/token{query_string}" |
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.
Function AsyncGoTrueAPI.sign_in_with_phone refactored with the following changes:
- Inline variable that is only used once (
inline-variable) - Move assignment closer to its usage within a block (
move-assign-in-block) - Simplify unnecessary nesting, casting and constant values in f-strings (
simplify-fstring-formatting)
| data = {"refresh_token": refresh_token} | ||
| url = f"{self.url}/token{query_string}" |
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.
Function AsyncGoTrueAPI.refresh_access_token refactored with the following changes:
- Inline variable that is only used once (
inline-variable) - Move assignment closer to its usage within a block (
move-assign-in-block) - Simplify unnecessary nesting, casting and constant values in f-strings (
simplify-fstring-formatting)
| self.headers = headers | ||
| self.cookie_options = cookie_options | ||
| self.http_client = http_client if http_client else SyncClient() | ||
| self.http_client = http_client or SyncClient() |
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.
Function SyncGoTrueAPI.__init__ refactored with the following changes:
- Simplify if expression by using or (
or-if-exp-identity)
| data = {"phone": phone, "password": password} | ||
| url = f"{self.url}/token{query_string}" |
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.
Function SyncGoTrueAPI.sign_in_with_phone refactored with the following changes:
- Inline variable that is only used once (
inline-variable) - Move assignment closer to its usage within a block (
move-assign-in-block) - Simplify unnecessary nesting, casting and constant values in f-strings (
simplify-fstring-formatting)
| data = {"refresh_token": refresh_token} | ||
| url = f"{self.url}/token{query_string}" |
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.
Function SyncGoTrueAPI.refresh_access_token refactored with the following changes:
- Inline variable that is only used once (
inline-variable) - Move assignment closer to its usage within a block (
move-assign-in-block) - Simplify unnecessary nesting, casting and constant values in f-strings (
simplify-fstring-formatting)
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 0.24%.
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! |
c8bff7b
into
fix/delete-user-returns-exception-event-if-response-is-ok
* fix: delete_user returns Exception event if response is Ok * 'Refactored by Sourcery' (#69) Co-authored-by: Sourcery AI <> * chore: format code Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Pull Request #68 refactored by Sourcery.
If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.
See our documentation here.
Run Sourcery locally
Reduce the feedback loop during development by using the Sourcery editor plugin:
Review changes via command line
To manually merge these changes, make sure you're on the
fix/delete-user-returns-exception-event-if-response-is-okbranch, then run:Help us improve this pull request!