-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
pyreverse
: Add option for colored output
#4850
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
Conversation
tests/pyreverse/test_writer.py
Outdated
obj = Mock() | ||
obj.node = Mock() | ||
obj.node.qname.return_value = "collections" | ||
assert writer.get_color(obj) == "grey" |
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.
I hope this test works well in the CI.
On my local computer it passes in the tox
environment, but fails when running the test directly from VS code. I guess it has something to do with the way the virtual environment is set up.
If it causes issues we can remove this test, I only included it because otherwise the corresponding could would have no test coverage. But given that the code is simple, having a more stable CI (and dev environments for other contributors) might be more important.
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.
It seems it's passing so probably something due to your VScode environment ? I don't see how this test could be flaky.
Pull Request Test Coverage Report for Build 1133158792
💛 - Coveralls |
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.
LGTM, I only have minor comments, this is definitely going in 2.10. Thanks again for the huge work you did on this!
Co-authored-by: Pierre Sassoulas <[email protected]>
doc/whatsnew/<current release.rst>
.Type of Changes
Description
This MR adds two command line options to
pyreverse
:--colorized
: Use colored output. Classes/modules of the same package get the same color.--max-color-depth
: Use separate colors up to package depth ofThis feature is usable with
DotPrinter
andPlantUmlPrinter
.VCGPrinter
will simply ignore the color passed to it.Closes #4488