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

Only instantiate colored objects if color is not disabled #634

Merged
merged 3 commits into from
Nov 8, 2022
Merged

Only instantiate colored objects if color is not disabled #634

merged 3 commits into from
Nov 8, 2022

Conversation

mhwaage
Copy link
Contributor

@mhwaage mhwaage commented Nov 8, 2022

Description

Only call colored functions (that instantiate colored objects under the hood) if colors have been enabled.

Related Issues

Checklist

  • This PR has sufficient documentation.
  • This PR has sufficient test coverage.
  • This PR title satisfies semantic convention.

Additional Comments

Not sure about whether/where to add tests to cover the change in behavior, happy to recieve suggestions.

@noahnu
Copy link
Collaborator

noahnu commented Nov 8, 2022

We'll need at least 1 test to catch any regression of this functionality. Otherwise a future refactor might accidentally revert it.

Alternatively we can add some comments explaining with a link to the GitHub issue.

@mhwaage
Copy link
Contributor Author

mhwaage commented Nov 8, 2022

I added a test for it, feel free to shift it to a more appropriate location

@noahnu noahnu merged commit 7f0fe22 into syrupy-project:master Nov 8, 2022
tophat-opensource-bot pushed a commit that referenced this pull request Nov 8, 2022
## [3.0.5](v3.0.4...v3.0.5) (2022-11-08)

### Bug Fixes

* only instantiate colored objects if color is not disabled ([#634](#634)) ([7f0fe22](7f0fe22))
@tophat-opensource-bot
Copy link
Contributor

🎉 This PR is included in version 3.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@noahnu
Copy link
Collaborator

noahnu commented Nov 9, 2022

@all-contributors add @mhwaage for bug

@allcontributors
Copy link
Contributor

@noahnu

I've put up a pull request to add @mhwaage! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Report summary crashes on Windows 10
3 participants