-
-
Notifications
You must be signed in to change notification settings - Fork 1
Sourcery Starbot ⭐ refactored DillonB07/GitAPI #20
Conversation
if response['data']['user']['login'] == 'DillonB07': | ||
output = True | ||
else: | ||
output = False | ||
assert output == True | ||
output = response['data']['user']['login'] == 'DillonB07' | ||
assert output |
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 test_user_info
refactored with the following changes:
- Simplify boolean if expression (
boolean-if-exp-identity
) - Replace if statement with if expression (
assign-if-exp
) - Simplify comparison to boolean (
simplify-boolean-comparison
)
if response['data']['repository']['nameWithOwner'] == 'DillonB07/GitAPI': | ||
output = True | ||
else: | ||
output = False | ||
assert output == True | ||
output = response['data']['repository']['nameWithOwner'] == 'DillonB07/GitAPI' | ||
assert output |
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 test_repo_info
refactored with the following changes:
- Simplify boolean if expression (
boolean-if-exp-identity
) - Replace if statement with if expression (
assign-if-exp
) - Simplify comparison to boolean (
simplify-boolean-comparison
)
assert output == True | ||
assert output |
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 test_custom_query
refactored with the following changes:
- Simplify comparison to boolean (
simplify-boolean-comparison
)
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 1.12%.
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! |
Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨
Here's your pull request refactoring your most popular Python repo.
If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.
Review changes via command line
To manually merge these changes, make sure you're on the
master
branch, then run: