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

Small optimisations #159

Merged
merged 3 commits into from
Jan 20, 2025
Merged

Small optimisations #159

merged 3 commits into from
Jan 20, 2025

Conversation

hugovk
Copy link
Owner

@hugovk hugovk commented Jan 20, 2025

Some small optimisations, won't make a huge amount of difference due to the heavy importlib import:

  • Exit early before parsing emoji
  • Only import json and random if needed
  • Replace re.sub() with str.replace()

@hugovk hugovk added the changelog: Changed For changes in existing functionality label Jan 20, 2025
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.54%. Comparing base (6bb70de) to head (353b1d7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
- Coverage   95.58%   95.54%   -0.05%     
==========================================
  Files           2        2              
  Lines         204      202       -2     
==========================================
- Hits          195      193       -2     
  Misses          9        9              
Flag Coverage Δ
macos-latest 92.57% <100.00%> (-0.08%) ⬇️
ubuntu-latest 93.06% <100.00%> (-0.07%) ⬇️
windows-latest 92.57% <100.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hugovk hugovk merged commit 81cf3de into main Jan 20, 2025
55 checks passed
@hugovk hugovk deleted the optimise branch January 20, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: Changed For changes in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant