-
Notifications
You must be signed in to change notification settings - Fork 213
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
Inherit render properties #116
Conversation
Codecov Report
@@ Coverage Diff @@
## master #116 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 504 504
=========================================
Hits 504 504
Continue to review full report at Codecov.
|
graphviz/dot.py
Outdated
@@ -67,6 +67,7 @@ def __init__(self, name=None, comment=None, | |||
self.body = list(body) if body is not None else [] | |||
|
|||
self.strict = strict | |||
self.enconding = encoding |
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.
This is handled by the super()
-call in line 61 above:
Line 103 in 0c503a3
self.encoding = encoding |
Thanks for working on this.
How about
Lines 98 to 100 in 0c503a3
+1. We should add a note to the (...)
with d.subgraph(name='child') as s:
s.strict = True
s.render('child.gv')
s.strict = None # any falsy value I think we should add a functional test for the use case of doing Another thing would be to extend the the docstring and maybe also the documentation section and to write a short summary of the behavioural difference for the CHANGES.txt. Tell me if/when you prefer me to take over, then we can probably merge what you have. |
I think this should be it. I didn't touch CHANGES.txt yet , that would still need to be done. It inherits the format now and that was the main thing I wanted, so I think you can take over now? |
Thanks. Still need a functional test, implement |
See adaptations in 4a20d2e |
Hi,
this is for #114 .
There are two things probably still have to be done:
I don't know what good non default values would be for 'encoding' and 'engine' for the test function.
There is a check in https://github.com/xflr6/graphviz/blob/master/graphviz/dot.py#L100 that subgraphs can't be strict, so it does not make sense to inherit that one.