Skip to content

Improve _set_top_tags function with simplified code and performance e…#57

Merged
bradmiller merged 1 commit into
twitter:mainfrom
lewismunday:patch-1
Feb 24, 2023
Merged

Improve _set_top_tags function with simplified code and performance e…#57
bradmiller merged 1 commit into
twitter:mainfrom
lewismunday:patch-1

Conversation

@lewismunday

Copy link
Copy Markdown
Contributor

…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.

…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.
@CLAassistant

CLAassistant commented Feb 16, 2023

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@bradmiller bradmiller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@bradmiller bradmiller merged commit ac2e13e into twitter:main Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants