Skip to content
This repository was archived by the owner on Jun 9, 2020. It is now read-only.

Commit 264c514

Browse files
authored
Merge pull request #29 from illusional/docs-fix
Docs fix
2 parents ffc53aa + fdf0005 commit 264c514

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ yaml_export = tool_object.export_string()
6868
tool_object.export()
6969

7070
# print to file
71-
with open("echotool.cwl", "w") as f:
72-
tool_object.export(f)
71+
tool_object.export("echotool.cwl")
7372
```
7473

7574
## References

cwlgen/requirements.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def __init__(self, req_class):
2323
def get_class(self):
2424
return self._req_class
2525

26+
def __hash__(self):
27+
return hash(self.get_class())
28+
2629
@classmethod
2730
def parse_dict(cls, d):
2831

examples/readme_example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@
1515

1616
# print to console
1717
tool_object.export()
18+
19+
tool_object.export("echotool.cwl")

0 commit comments

Comments
 (0)