haystack
haystack copied to clipboard
revert Remove pipes
Related Issues
- fixes wrongly formatted code on https://haystack.deepset.ai/reference/ranker#sentencetransformersranker
Proposed Changes:
Revert the |
removal change, it turned out to be necessary to render the code on docs.
How did you test it?
Notes for the reviewer
Checklist
- [ ] I have read the contributors guidelines and the code of conduct
- [ ] I have updated the related issue with new insights and changes
- [ ] I added tests that demonstrate the correct behavior of the change
- [ ] I've used the conventional commit convention for my PR title
- [ ] I documented my code
- [ ] I ran pre-commit hooks and fixed any issue
I believe the pipes are necessary to make the code examples formatted. In this example at least they should keep all the lines at the same indentation level. De-intenting each line of the code example in the docstring should also work but would have to experiment first to find out.
In any case, this should all be simplified when we migrate to Readme. Then I will write a more exact guide on how to format code examples in doc strings. For now I think keeping the pipes would be a safer option.