Improve _set_top_tags function with simplified code and performance e…#57
Merged
Conversation
…nhancements Refactored _set_top_tags function by using a list comprehension instead of a for loop to create tag tuples, and a slice instead of passing range to map to get the top two tags. These changes simplified the code and potentially improved its performance.
bradmiller
approved these changes
Feb 24, 2023
bradmiller
left a comment
Contributor
There was a problem hiding this comment.
Thanks lewismunday for the PR! I've gone ahead and approved. Just as a heads-up, there are some formatting differences between this code and the python styling enforced at Twitter, so you may see styling changes to this code in the future.
Thanks again for your contribution!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…nhancements
Refactored _set_top_tags function by using a list comprehension instead of a for loop to create tag tuples, and a slice instead of passing range to map to get the top two tags. These changes simplified the code and potentially improved its performance.