Skip to content
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

🔨 [tuning] Optimize utils using built-in func and list comprehension #33

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

hitblast
Copy link
Owner

@hitblast hitblast commented Apr 30, 2024

This PR changes:

  • Two functions, count_vowels() and count_consonants() inside the utils package (avro/utils/count.py) so that they use the built-in sum() function, along with list comprehension to quickly scroll through the provided inventory variables on runtime.

Attempts to fix: #31

@hitblast hitblast added the enhancement New feature or request label Apr 30, 2024
@hitblast hitblast self-assigned this Apr 30, 2024
@baseplate-admin
Copy link
Contributor

This looks correct. Job well done

@hitblast
Copy link
Owner Author

This looks correct. Job well done

Thanks for your review! Merging.

@hitblast hitblast merged commit e8d67e7 into main Apr 30, 2024
3 checks passed
@hitblast hitblast deleted the optimize-utils branch April 30, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

This code can be optimized using list comprehension
2 participants