You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears if the coverage extension fails to find the module (or simply is empty, then it crashes because it divides by the number of objects in that module, which is 0.
Traceback (most recent call last):
File "/home/aragilar/Projects/DC/dcldap/.tox/docs/lib/python3.11/site-packages/sphinx/cmd/build.py", line 298, in build_main
app.build(args.force_all, args.filenames)
File "/home/aragilar/Projects/DC/dcldap/.tox/docs/lib/python3.11/site-packages/sphinx/application.py", line 355, in build
self.builder.build_update()
File "/home/aragilar/Projects/DC/dcldap/.tox/docs/lib/python3.11/site-packages/sphinx/builders/__init__.py", line 290, in build_update
self.build(['__all__'], to_build)
File "/home/aragilar/Projects/DC/dcldap/.tox/docs/lib/python3.11/site-packages/sphinx/builders/__init__.py", line 363, in build
self.write(docnames, list(updated_docnames), method)
File "/home/aragilar/Projects/DC/dcldap/.tox/docs/lib/python3.11/site-packages/sphinx/ext/coverage.py", line 110, in write
self.write_py_coverage()
File "/home/aragilar/Projects/DC/dcldap/.tox/docs/lib/python3.11/site-packages/sphinx/ext/coverage.py", line 310, in write_py_coverage
self._write_py_statistics(sys.stdout)
File "/home/aragilar/Projects/DC/dcldap/.tox/docs/lib/python3.11/site-packages/sphinx/ext/coverage.py", line 295, in _write_py_statistics
f'{100 * len(all_documented_objects) / len(all_objects):.2f}%',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
ZeroDivisionError: division by zero
How to Reproduce
Running the coverage builder on an empty project should reproduce this.
Describe the bug
It appears if the coverage extension fails to find the module (or simply is empty, then it crashes because it divides by the number of objects in that module, which is 0.
How to Reproduce
Running the coverage builder on an empty project should reproduce this.
Environment Information
Sphinx extensions
Additional context
No response
The text was updated successfully, but these errors were encountered: