Skip to content

Directive sphinx_argparse_cli seems to not be recognized #196

@jsilva234

Description

@jsilva234

Hey there

Not being able to use this sphinx extension with the guideline in the README file.

I got the following exception:

Exception occurred:
  File "/Users/joaosilva/.pyenv/versions/cli_sphinx_3.12/lib/python3.12/site-packages/sphinx_argparse_cli/_logic.py", line 110, in parser
    module_name, attr_name = self.options["module"], self.options["func"]
                             ~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'module'

RST code was something like this:

.. sphinx_argparse_cli::
    :module: base_parsers
    :func: build_parser
    :prog: name
    :no_default_values:

After some tweaking, was able to make it run, but had to change this line from sphinx_argparse_cli to sphinx-argparse-cli and using the directive accordingly.
Not sure if this make sense to you, I'm new to sphinx

python 3.12
sphinx 8.1.3
sphinx-argparse-cli 1.18.2

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions