You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
584 B

6 months ago
# coding=utf-8
from faker.sphinx.docstring import ProviderMethodDocstring
from faker.sphinx.documentor import write_provider_docs
def _create_source_files(app):
write_provider_docs()
def _process_docstring(app, what, name, obj, options, lines):
docstring = ProviderMethodDocstring(app, what, name, obj, options, lines)
if not docstring.skipped:
lines[:] = docstring.lines[:]
def setup(app):
app.setup_extension("sphinx.ext.autodoc")
app.connect("builder-inited", _create_source_files)
app.connect("autodoc-process-docstring", _process_docstring)