-
-
Notifications
You must be signed in to change notification settings - Fork 37
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 refactored master branch #36
Conversation
ee3d5ca
to
738d3e8
Compare
score = score * 100 | ||
score *= 100 |
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 sentiment_polarity
refactored with the following changes:
- Replace assignment with augmented assignment (
aug-assign
)
line = re.findall(r'[0-9]+', text) | ||
return line | ||
return re.findall(r'[0-9]+', text) |
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 gather_whole_numbers
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
found_stop_words = [word for _, word in enumerate(word_tokens) | ||
return [word for _, word in enumerate(word_tokens) | ||
if word in STOP_WORDS] | ||
return found_stop_words |
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 gather_stop_words
refactored with the following changes:
- Inline variable that is immediately returned (
inline-immediately-returned-variable
)
for index in range(1): | ||
for _ in range(1): |
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 generate_data
refactored with the following changes:
- Replace unused for index with underscore (
for-index-underscore
)
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 0.43%.
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! Let us know what you think of it by mentioning @sourcery-ai in a comment. |
@soucery-ai please take a look at this comment #36 (comment), the formatting could be improved here - empty table can be removed if no recommendations exist |
Codecov Report
@@ Coverage Diff @@
## master #36 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 360 358 -2
Branches 51 51
=========================================
- Hits 360 358 -2
Continue to review full report at Codecov.
|
@sourcery-ai I think when you are mention |
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.
LGTM
Thanks @sourcery-ai
Branch
master
refactored by Sourcery.If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
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
master
branch, then run: