-
Notifications
You must be signed in to change notification settings - Fork 44.5k
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
move remove_color_codes to utils and add tests #3260
move remove_color_codes to utils and add tests #3260
Conversation
c5ef99d
to
d6ba1c2
Compare
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #3260 +/- ##
=======================================
Coverage 56.46% 56.46%
=======================================
Files 65 65
Lines 3018 3018
Branches 507 507
=======================================
Hits 1704 1704
Misses 1175 1175
Partials 139 139 ☔ View full report in Codecov by Sentry. |
4358899
to
31e1094
Compare
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
28cd383
to
310e8bc
Compare
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
310e8bc
to
e9fe1f4
Compare
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
e9fe1f4
to
a0b9ae9
Compare
a0b9ae9
to
47883ce
Compare
Some ai_settings formats can cause goals to load as list(dict) not list(str) Refactor code in utils.py to explicitly convert input type to string in remove_color_codes() function. - Updated remove_color_codes function to convert input argument to string type explicitly to avoid unexpected type errors. - Test case added to check conversion of dict to string in remove_color_codes function.
Why have you moved the function from the only module in which it is used? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function move needs justification. It's okay if you can explain why you're doing it (e.g. do you have another pr in the works where you need this function outside the logs
module?). Otherwise it needs to move back.
The tests are great! They need parameterization though. Code changes are suggested. I recommend taking a look at the pytest docs to see more about paramerizing tests and using fixture. They are amazingly useful features for organizing tests.
…-refactor-plus-tests
Co-authored-by: James Collins <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Background
Received a complain from team member for potential fails in remove_color_codes, so tests were created.
Changes
Moved remove_color_codes to utils and added tests.
PR Quality Checklist