dry-python / dry-python/returns

Move several examples from the docs to tests and then `literalinclude` them

オープン
#678 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
documentation enhancement good first issue hacktoberfest help wanted
主要言語
Python
スター
4.4k
フォーク
155
平均マージ
2時間 27分
マージ済み PR(30日)
22

説明

We have several quite large examples that live in our docs:
1. https://github.com/dry-python/returns/blob/master/docs/pages/future.rst#futureresult
2. `Number` example from: https://github.com/dry-python/returns/blob/master/docs/pages/contrib/hypothesis_plugins.rst#check_all_laws
3. https://github.com/dry-python/returns/blob/master/docs/pages/context.rst#requirescontextfutureresult-container

What needs to be done?
- We need to extract these examples from docs to `tests/test_docs` folder
- Instead, we should add this:

```rst
.. literalinclude:: ../../tests/test_docs/test_${SOME_NEW_FILENAME}.py
:linenos:
```

- Provide a link to the source code on github somewhere near the example itself
- Possibly we would need to add some dev-dependencies to both `pyproject.toml` and `docs/requirements.txt`
- Make sure that it is checked by `flake8`, `mypy`, and `pytest`. And that it actually works.

This way we would have nice, complex, but working examples! 📖

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。