-
-
Notifications
You must be signed in to change notification settings - Fork 53
Fixes string formatting (Sourcery refactored) #65
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! |
Pull Request #64 refactored by Sourcery.
Since the original Pull Request was opened as a fork in a contributor's
repository, we are unable to create a Pull Request branching from it.
To incorporate these changes, you can either:
Merge this Pull Request instead of the original, or
Ask your contributor to locally incorporate these commits and push them to
the original Pull Request
Incorporate changes via command line
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:
Help us improve this pull request!