Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI docs: remove hack for wrapping the CLI reference #159

Closed
stefmolin opened this issue May 23, 2024 · 2 comments · Fixed by #185
Closed

CLI docs: remove hack for wrapping the CLI reference #159

stefmolin opened this issue May 23, 2024 · 2 comments · Fixed by #185
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@stefmolin
Copy link
Owner

stefmolin commented May 23, 2024

Maybe this was a limitation of the theme at the time, but try to switch from the hack here:

def _generate_parser_for_docs() -> argparse.ArgumentParser:
"""
Generate an argument parser for the documentation only.
Returns
-------
argparse.argparse.ArgumentParser
Modified argument parser class for the documentation.
"""
parser = generate_parser()
usage_text = parser.format_usage()
parser.format_usage = lambda: textwrap.fill(
usage_text.replace(' ', ' '),
width=USAGE_WIDTH_FOR_DOCS,
subsequent_indent='\t',
break_on_hyphens=False,
break_long_words=False,
)
return parser

to use generate_parser directly in the docs (here).

Perhaps moving to this will solve it?

Try updating the version of the theme and/or adding some CSS.

@stefmolin stefmolin added documentation Improvements or additions to documentation help wanted Extra attention is needed good first issue Good for newcomers labels May 23, 2024
@roynico
Copy link

roynico commented Jul 13, 2024

What about using click?

@stefmolin
Copy link
Owner Author

stefmolin commented Jul 13, 2024

What about using click?

I'm not interested in making a change to this at the moment.

@stefmolin stefmolin self-assigned this Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants