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

Upgrade: Bump rich-argparse from 1.3.0 to 1.4.0 #118

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 13, 2023

Bumps rich-argparse from 1.3.0 to 1.4.0.

Release notes

Sourced from rich-argparse's releases.

Version 1.4.0

Highlights of the release

  • Make RichHelpFormatter itself renderable. This means it is now possible to do the following:
    from rich.console import Console
    from rich_argparse import RichHelpFormatter
    console = Console()
    formatter = RichHelpFormatter("prog")
    formatter.add_usage(...)
    formatter.add_text(...)
    formatter.add_arguments(...)
    ...
    console.print(formatter)  # <-- correctly prints the colored help

  • Add HelpPreviewAction to generate a preview of the help output in SVG, HTML, or TXT formats. Use this action to generate a colorful preview of the help output to include in your documentation.
    import argparse
    from rich.terminal_theme import DIMMED_MONOKAI
    from rich_argparse import HelpPreviewAction, RichHelpFormatter
    parser = argparse.ArgumentParser(..., formatter_class=RichHelpFormatter)
    ...
    parser.add_argument("--generate-help-preview", action=HelpPreviewAction)
    Use it like this:

    COLUMNS=120 python my_cli.py --generate-help-preview  my-help.svg
  • Speed up import time of rich_argparse by about 35% by avoiding importing typing.
  • Allow arbitrary renderables in the descriptions and epilog. This means you can now include any rich renderable including Markdown, Table, Panel, ... as a program description, group description, or epilog:
    import argparse
    from rich.markdown import Markdown
    from rich_argparse import RichHelpFormatter
    description = """
    My program
    This is a markdown description of my program.
    
    It has a list
    And a table
    
    
    
    
    Column 1
    Column 2
    
    
    
    
    Value 1
    Value 2
    
    
    """
    
    
    
    
    
    
    

... (truncated)

Changelog

Sourced from rich-argparse's changelog.

1.4.0 - 2023-10-21

Features

  • Make RichHelpFormatter itself a rich renderable.
  • Allow passing custom console to RichHelpFormatter.
  • Add HelpPreviewAction to generate a preview of the help output in SVG, HTML, or TXT formats.
  • Avoid importing typing to improve startup time by about 35%.
  • Add a style for default values when using %(default)s in the help text.
  • Allow arbitrary renderables in the descriptions and epilog

Fixes

  • Fix color of brackets surrounding positional arguments in the usage.
Commits
  • 9841bfc Version 1.4.0
  • 396cd74 Fix color of brackets surrounding positional arguments in the usage (#101)
  • 47b8fb7 Allow arbitrary renderables in the descriptions and epilog (#99)
  • f44ef44 Regenerate README preview
  • cee636e Add a style for default values when using %(default)s (#98)
  • e3c4dac Avoid importing typing to improve startup time 35% (#97)
  • f38bd65 Add links to the changelog (#96)
  • 2527012 Ignore paths on pull requests
  • f4c5a37 Add action to generate SVG, HTML, or TXT help preview (#93)
  • 8936d50 [pre-commit.ci] pre-commit autoupdate (#94)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [rich-argparse](https://github.com/hamdanal/rich-argparse) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/hamdanal/rich-argparse/releases)
- [Changelog](https://github.com/hamdanal/rich-argparse/blob/main/CHANGELOG.md)
- [Commits](hamdanal/rich-argparse@v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: rich-argparse
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Nov 13, 2023
@yassun7010 yassun7010 merged commit f6a9c6c into main Nov 14, 2023
2 checks passed
@yassun7010 yassun7010 deleted the dependabot/pip/rich-argparse-1.4.0 branch November 14, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant