-
Notifications
You must be signed in to change notification settings - Fork 5
Fix: Remove spurious nodes in dot files due to \n #268
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
🦙 MegaLinter status:
|
Descriptor | Linter | Files | Fixed | Errors | Elapsed time |
---|---|---|---|---|---|
black | 29 | 1 | 1.44s | ||
✅ PYTHON | pylint | 29 | 0 | 4.25s |
See detailed report in MegaLinter reports
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #268 +/- ##
=======================================
Coverage 95.59% 95.60%
=======================================
Files 22 22
Lines 1567 1569 +2
=======================================
+ Hits 1498 1500 +2
Misses 69 69
Continue to review full report in Codecov by Sentry.
|
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 such a simple solution! I love it! I'm seeing a couple of pylint/black issues that might need looking at before merging, although I can't see what they are so they might be errors or something...
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 like a good solution to me
@@ -133,7 +133,9 @@ class CausalDAG(nx.DiGraph): | |||
def __init__(self, dot_path: str = None, **attr): | |||
super().__init__(**attr) | |||
if dot_path: | |||
pydot_graph = pydot.graph_from_dot_file(dot_path) | |||
with open(dot_path, 'r', encoding='utf-8') as file: | |||
dot_content = file.read().replace('\n', '') |
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 think it may be worth adding a comment describing this, as the problem this is solving is not obvious from the code.
Fixes issue #258 by: