Skip to content
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

chore(docs): fix typos in docstrings #154

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

jeertmans
Copy link
Contributor

Hello!

This is a small PR to fix typos in docstrings.

Maybe, I would suggest adding an import for dataclass in the example (otherwise it will not run), and maybe indicate that it works with other dataclass decorators, like the dataclass decorator from chex.

Hello!

This is a small PR to fix typos in docstrings.

Maybe, I would suggest adding an import for `dataclass` in the example (otherwise it will not run), and maybe indicate that it works with other dataclasses decorators, like the `dataclass` decorator from chex.
@patrick-kidger patrick-kidger merged commit adf1a5e into patrick-kidger:main Jan 5, 2024
2 checks passed
@jeertmans jeertmans deleted the patch-1 branch January 5, 2024 12:37
@patrick-kidger
Copy link
Owner

Thank you for the fixes! These look great to me. :)

Good points about the import and the other dataclass options. I'll tweak the docs for this one now.

@jeertmans
Copy link
Contributor Author

As a suggestion, including doctests inside your test workflow might help to catch that kind of "errors" in the future :-)

Pytest includes support for that, which you can automatically enable in your pyproject.toml file:

[tool.pytest.ini_options]
addopts = [
  '--doctest-modules',
]

@patrick-kidger
Copy link
Owner

Hmm, I do often use non-runnable incomplete code snippets in docs, so I'm not completely sold. Happy to consider a PR on this if it doesn't change too much, but to be honest I don't feel so strongly that I'll add it myself ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants