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

Replace regex support with highlight() #53

Merged
merged 1 commit into from
Feb 22, 2021
Merged

Conversation

mrz1988
Copy link
Owner

@mrz1988 mrz1988 commented Feb 22, 2021

Summary

Remove old styling by index and regex on LilyString and LilyBlock objects, and implement a new highlight() utility method that does a similar thing.

Technical Details

Support has been removed for the following methods:

  • LilyString.style_chars
  • LilyString.style_char
  • LilyString.style_regex
  • LilyBlock.style_regex

Why?

This continues along the theme of #51 to reduce the footprint and responsibility of Lily object classes, and instead provide powerful, intuitive utility functions. Prefer universal tools rather than forcing casts.

@codecov
Copy link

codecov bot commented Feb 22, 2021

Codecov Report

Merging #53 (2897779) into master (4f3218e) will increase coverage by 1.64%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #53      +/-   ##
==========================================
+ Coverage   89.50%   91.15%   +1.64%     
==========================================
  Files          35       36       +1     
  Lines        1811     1820       +9     
  Branches      301      300       -1     
==========================================
+ Hits         1621     1659      +38     
+ Misses        163      134      -29     
  Partials       27       27              
Impacted Files Coverage Δ
lilies/objects/lilyblock.py 95.20% <ø> (+2.18%) ⬆️
lilies/__init__.py 81.81% <100.00%> (ø)
lilies/api/__init__.py 100.00% <100.00%> (ø)
lilies/api/highlight.py 100.00% <100.00%> (ø)
lilies/objects/lilystring.py 87.57% <100.00%> (+5.96%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f3218e...2897779. Read the comment docs.

@mrz1988
Copy link
Owner Author

mrz1988 commented Feb 22, 2021

WOO FOR OVER 90% CODE COVERAGE NOW 🎉 🎉
CODECOV IS BESIDE ITSELF

@mrz1988 mrz1988 merged commit 5c180d7 into master Feb 22, 2021
@mrz1988 mrz1988 deleted the refactor-highlight branch February 22, 2021 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant