sphinx-doc / sphinx-argparse

A Sphinx extension to automatically document argparse commands and options
https://sphinx-argparse.readthedocs.org/
MIT License
26 stars 24 forks source link

Support ``autodoc_mock_imports`` #35

Closed prajeeshag closed 5 days ago

prajeeshag commented 1 year ago

Sphinx autodoc_mock_imports is implemented here. https://github.com/ashb/sphinx-argparse/issues/9#issue-1097057823

mark-nicholson commented 4 days ago

Something is awry with this commit. I get a crash at that first line. version 0.4.0 work like a champ for a long time.

  File "/u02/masatest/mjnichol-3.6.1.dev1-bscrub-311/venv/lib64/python3.11/site-packages/sphinxarg/ext.py", line 509, in run
    with mock(self.config.autodoc_mock_imports):
              ^^^^^^^^^^^
AttributeError: 'ArgParseDirective' object has no attribute 'config'
AA-Turner commented 3 days ago

Fixed in 11bfc2bbc0fec600acd1d59e3cfa4d8e92379eb7; sorry. See also #56.

A