sphinx-doc / sphinx-argparse

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

support reading Argparse instances inside classes #36

Closed laf0rge closed 2 months ago

laf0rge commented 1 year ago

So far, shphinxarg only has support for reading/importing Argparse instances from global variables/attributes within a module. However, there are use cases where Argparse is used inside classes of a module, not as a global variable. This is particularly the case for uses of 'argparse' in the context of CLI / REPL style user interfaces, such as for example those built using the 'cmd2' module.

This change introduces the ability to specify :func: wit '.' notation like foo.bar.baz

AA-Turner commented 2 months ago

Please re-open a new PR that has been rebased (and ideally with tests). Closing for now.

A