-
Notifications
You must be signed in to change notification settings - Fork 19
Sourcery Starbot ⭐ refactored ComputerScientist-01/Advanced-Programming-Practice #16
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
Sourcery Starbot ⭐ refactored ComputerScientist-01/Advanced-Programming-Practice #16
Conversation
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.
Lines 3-10 refactored with the following changes:
- Replace assignment with augmented assignment (
aug-assign) - Convert for loop into call to sum() (
sum-comprehension)
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 sumofDigits refactored with the following changes:
- Convert for loop into call to sum() (
sum-comprehension)
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 binaryToDecimal refactored with the following changes:
- Replace assignment with augmented assignment (
aug-assign)
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 pascal_triangle refactored with the following changes:
- Replace unused for index with underscore (
for-index-underscore)
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.
Lines 5-17 refactored with the following changes:
- Replace assignment with augmented assignment (
aug-assign) - Replace list() with [] (
list-literal) - Replace dict() with {} (
dict-literal) - Remove unnecessary call to keys() (
remove-dict-keys) - Replace unused for index with underscore (
for-index-underscore) - Use items() to directly unpack dictionary values (
use-dict-items)
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 display refactored with the following changes:
- Replace assignment with augmented assignment (
aug-assign) - Replace manual loop counter with call to enumerate (
convert-to-enumerate)
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 users_registered refactored with the following changes:
- Replace assignment with augmented assignment (
aug-assign) - Replace manual loop counter with call to enumerate (
convert-to-enumerate)
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 producer_func refactored with the following changes:
- Replace unused for index with underscore (
for-index-underscore)
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 consumer_func refactored with the following changes:
- Replace unused for index with underscore (
for-index-underscore)
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.
Lines 35-35 refactored with the following changes:
- Replace range(0, x) with range(x) (
remove-zero-from-range) - Replace unused for index with underscore (
for-index-underscore)
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.
Lines 18-19 refactored with the following changes:
- Remove redundant pass statement (
remove-redundant-pass)
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.
Lines 79-79 refactored with the following changes:
- Replace multiple comparisons of same variable with
inoperator (merge-comparisons)
04e2d85
into
ComputerScientist-01:main
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
mainbranch, then run: