beartype / plum

Multiple dispatch in Python
https://beartype.github.io/plum
MIT License
497 stars 22 forks source link

Use Sybil for doctests #142

Closed nstarman closed 1 month ago

nstarman commented 1 month ago

This PR add docstring testing and testing of the docs via Sybil (https://sybil.readthedocs.io/en/latest/). I'm not sure what style of docstrings you want... My last PR was in the NumPy style, but the rest of the docs are in Google's...

If you don't like the try: ...; ... except Exception as e: print(f"{type(e).__name__}: {e}"), I think we can subclass sybil.parsers.myst.PythonCodeBlockParser and modify it so that the try: except operates behind the scenes. IMO I like that it's explicit and the examples are safer to copy-paste.

Found:

Squash merge is fine!

nstarman commented 1 month ago

Hmm. This passes on py3.12 on my local version.

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 8786086897

Details


Totals Coverage Status
Change from base Build 8773615289: 0.0%
Covered Lines: 1219
Relevant Lines: 1219

💛 - Coveralls
nstarman commented 1 month ago

I think the failure is unrelated

wesselb commented 1 month ago

Again, this is a fantastic PR, @nstarman! Merging this right away. :) Thanks so much!!