pax_global_header 0000666 0000000 0000000 00000000064 15247065310 0014515 g ustar 00root root 0000000 0000000 52 comment=30ac1778e60975b00d52ac8a565499fd4c30ea0d rich-click-1.9.9/ 0000775 0000000 0000000 00000000000 15247065310 0013545 5 ustar 00root root 0000000 0000000 rich-click-1.9.9/.coveragerc 0000664 0000000 0000000 00000000051 15247065310 0015662 0 ustar 00root root 0000000 0000000 [run] branch = True include = src/** rich-click-1.9.9/.github/ 0000775 0000000 0000000 00000000000 15247065310 0015105 5 ustar 00root root 0000000 0000000 rich-click-1.9.9/.github/workflows/ 0000775 0000000 0000000 00000000000 15247065310 0017142 5 ustar 00root root 0000000 0000000 rich-click-1.9.9/.github/workflows/build-docs.yml 0000664 0000000 0000000 00000002720 15247065310 0021713 0 ustar 00root root 0000000 0000000 name: Build docs on: workflow_dispatch: push: branches: - main # Cancel if a newer run is started concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true permissions: contents: write jobs: build_docs: runs-on: ubuntu-latest steps: - name: Check out the repo # persisted credentials are required for the rich-codex step to push commits uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 # zizmor: ignore[artipacked] - name: Set up Python uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 with: # The docs group requires >=3.13 (see tool.uv in pyproject.toml). python-version: "3.13" activate-environment: true - name: Install dependencies run: uv sync --active --group docs - name: Generate terminal images with rich-codex if: github.repository_owner == 'ewels' || github.event_name == 'workflow_dispatch' uses: ewels/rich-codex@80de9de011c994f32274bb4cffee140567621d8e # v1.2.11 with: skip_python_setup: "true" commit_changes: "true" # clean_img_paths: docs/images/*.svg terminal_width: 80 skip_git_checks: "true" working_dir: "." - name: Build and deploy docs run: uv run --with . docs/_deploy.py env: PACKAGE_NAME: rich-click rich-click-1.9.9/.github/workflows/deploy-pypi.yml 0000664 0000000 0000000 00000001757 15247065310 0022152 0 ustar 00root root 0000000 0000000 name: Publish rich-click to PyPI on: release: types: [published] permissions: {} jobs: build-n-publish: if: github.repository == 'ewels/rich-click' runs-on: ubuntu-latest environment: name: pypi url: https://pypi.org/p/rich-click permissions: id-token: write # Required for PyPI Trusted Publishing (OIDC) steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 name: Check out source-code repository with: persist-credentials: false - name: Set up Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.13" - name: Install python dependencies run: python -m pip install --upgrade pip setuptools wheel build - name: Build the distribution run: python -m build - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 rich-click-1.9.9/.github/workflows/prek.yml 0000664 0000000 0000000 00000001113 15247065310 0020622 0 ustar 00root root 0000000 0000000 name: Lint code on: push: pull_request: permissions: {} jobs: prek: runs-on: ubuntu-latest permissions: contents: read steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - name: Set up Python uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 with: python-version: 3 activate-environment: true - name: Install dependencies run: uv sync --active - name: Run prek run: prek run -a rich-click-1.9.9/.github/workflows/pytest.yml 0000664 0000000 0000000 00000003471 15247065310 0021222 0 ustar 00root root 0000000 0000000 name: Test Coverage on: push: pull_request: permissions: {} jobs: test: runs-on: ubuntu-22.04 permissions: contents: read strategy: matrix: python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] click: [8.0.*, 8.1.*, 8.2.*, 8.3.*, 8.4.*, 8.5.*] rich: [12.*, 13.*, 14.*, 15.*] typer: [0.17.*, 0.25.*] exclude: - python: "3.8" rich: 15.* - python: "3.8" click: 8.2.* - python: "3.9" click: 8.2.* - python: "3.8" click: 8.3.* - python: "3.9" click: 8.3.* - python: "3.8" click: 8.4.* - python: "3.9" click: 8.4.* - python: "3.8" click: 8.5.* - python: "3.9" click: 8.5.* - typer: 0.25.* rich: 12.* - click: 8.0.* typer: 0.25.* - click: 8.1.* typer: 0.25.* - click: 8.2.* typer: 0.25.* steps: - name: Check out the repo uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - name: Set up Python uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 with: python-version: ${{ matrix.python }} activate-environment: true - name: Run tests run: | uv run \ --with "click==$CLICK_VERSION" \ --with "rich==$RICH_VERSION" \ --with "typer==$TYPER_VERSION" \ --prerelease=allow \ pytest --cov --cov-report term env: CLICK_VERSION: ${{ matrix.click }} RICH_VERSION: ${{ matrix.rich }} TYPER_VERSION: ${{ matrix.typer }} rich-click-1.9.9/.github/workflows/rich-codex.yml 0000664 0000000 0000000 00000002070 15247065310 0021711 0 ustar 00root root 0000000 0000000 name: Rich-codex on: workflow_dispatch: permissions: {} jobs: rich_codex: runs-on: ubuntu-latest permissions: contents: write # rich-codex commits & pushes generated screenshots steps: - name: Check out the repo # persisted credentials are required for rich-codex to push commits uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 # zizmor: ignore[artipacked] - name: Set up Python uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 with: # The docs group requires >=3.13 (see tool.uv in pyproject.toml). python-version: "3.13" activate-environment: true - name: Install dependencies run: uv sync --active --no-default-groups --group docs - name: Generate terminal images with rich-codex uses: ewels/rich-codex@80de9de011c994f32274bb4cffee140567621d8e # v1.2.11 with: use_uv: "true" skip_python_setup: "true" commit_changes: "true" skip_git_checks: "true" rich-click-1.9.9/.github/workflows/scheduled-tests.yml 0000664 0000000 0000000 00000001521 15247065310 0022764 0 ustar 00root root 0000000 0000000 name: Scheduled Tests on: schedule: - cron: '0 0 * * 6' # Every Saturday at 00:00 permissions: {} jobs: test: if: github.event_name != 'schedule' || github.repository == 'ewels/rich-click' runs-on: ubuntu-22.04 permissions: contents: read strategy: matrix: python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - name: Check out the repo uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - name: Set up Python uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 with: python-version: ${{ matrix.python }} activate-environment: true - name: Run tests run: uv run --prerelease=allow pytest --cov --cov-report term rich-click-1.9.9/.github/workflows/test-examples.yml 0000664 0000000 0000000 00000002207 15247065310 0022461 0 ustar 00root root 0000000 0000000 name: Test Examples on: [push, pull_request] permissions: {} jobs: examples: runs-on: ubuntu-22.04 permissions: contents: read strategy: matrix: python: ["3.8", "3.13", "3.14"] click: [8.0.*, 8.1.*, 8.2.*, 8.3.*, 8.5.*] exclude: - python: "3.8" click: 8.2.* - python: "3.8" click: 8.3.* - python: "3.8" click: 8.5.* steps: - name: Check out the repo uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - name: Set up Python uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 with: python-version: ${{ matrix.python }} activate-environment: true - name: Test examples run: | for f in examples/*py do echo -e "\n\n$f" uv run \ --no-default-groups \ --with "click==$CLICK_VERSION" \ python "${f}" --help || exit 1; done env: CLICK_VERSION: ${{ matrix.click }} rich-click-1.9.9/.gitignore 0000664 0000000 0000000 00000033435 15247065310 0015545 0 ustar 00root root 0000000 0000000 .python-versions uv.lock .venv_*/ # I use `hello.py` to do some local dev stuff. /hello.py # Created by https://www.toptal.com/developers/gitignore/api/macos,linux,windows,pycharm+all,visualstudio,intellij+all,python # Edit at https://www.toptal.com/developers/gitignore?templates=macos,linux,windows,pycharm+all,visualstudio,intellij+all,python ### Intellij+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff .idea/**/workspace.xml .idea/**/tasks.xml .idea/**/usage.statistics.xml .idea/**/dictionaries .idea/**/shelf # AWS User-specific .idea/**/aws.xml # Generated files .idea/**/contentModel.xml # Sensitive or high-churn files .idea/**/dataSources/ .idea/**/dataSources.ids .idea/**/dataSources.local.xml .idea/**/sqlDataSources.xml .idea/**/dynamic.xml .idea/**/uiDesigner.xml .idea/**/dbnavigator.xml # Gradle .idea/**/gradle.xml .idea/**/libraries # Gradle and Maven with auto-import # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. # .idea/artifacts # .idea/compiler.xml # .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules # *.iml # *.ipr # CMake cmake-build-*/ # Mongo Explorer plugin .idea/**/mongoSettings.xml # File-based project format *.iws # IntelliJ out/ # mpeltonen/sbt-idea plugin .idea_modules/ # JIRA plugin atlassian-ide-plugin.xml # Cursive Clojure plugin .idea/replstate.xml # SonarLint plugin .idea/sonarlint/ # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties # Editor-based Rest Client .idea/httpRequests # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser ### Intellij+all Patch ### # Ignore everything but code style settings and run configurations # that are supposed to be shared within teams. .idea/* !.idea/codeStyles !.idea/runConfigurations ### Linux ### *~ # temporary files which can be created if a process still has a handle open of a deleted file .fuse_hidden* # KDE directory preferences .directory # Linux trash folder which might appear on any partition or disk .Trash-* # .nfs files are created when an open file is removed but is still being accessed .nfs* ### macOS ### # General .DS_Store .AppleDouble .LSOverride # Icon must end with two \r Icon # Thumbnails ._* # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent # Directories potentially created on remote AFP share .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk ### PyCharm+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff # AWS User-specific # Generated files # Sensitive or high-churn files # Gradle # Gradle and Maven with auto-import # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. # .idea/artifacts # .idea/compiler.xml # .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules # *.iml # *.ipr # CMake # Mongo Explorer plugin # File-based project format # IntelliJ # mpeltonen/sbt-idea plugin # JIRA plugin # Cursive Clojure plugin # SonarLint plugin # Crashlytics plugin (for Android Studio and IntelliJ) # Editor-based Rest Client # Android studio 3.1+ serialized cache file ### PyCharm+all Patch ### # Ignore everything but code style settings and run configurations # that are supposed to be shared within teams. ### Python ### # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ cover/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder .pybuilder/ target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv # For a library or package, you might want to ignore these files since the code is # intended to run in multiple environments; otherwise, check them in: .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. #Pipfile.lock # poetry # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. # This is especially recommended for binary packages to ensure reproducibility, and is more # commonly ignored for libraries. # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control #poetry.lock # PEP 582; used by e.g. github.com/David-OConnor/pyflow __pypackages__/ # Celery stuff celerybeat-schedule celerybeat.pid # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ # pytype static type analyzer .pytype/ # Cython debug symbols cython_debug/ # PyCharm # JetBrains specific template is maintained in a separate JetBrains.gitignore that can # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ ### Windows ### # Windows thumbnail cache files Thumbs.db Thumbs.db:encryptable ehthumbs.db ehthumbs_vista.db # Dump file *.stackdump # Folder config file [Dd]esktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Windows Installer files *.cab *.msi *.msix *.msm *.msp # Windows shortcuts *.lnk ### VisualStudio ### ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # ASP.NET Scaffolding ScaffoldingReadMe.txt # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.tlog *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*.json coverage*.xml coverage*.info # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (https://github.com/github/gitignore/pull/2483#issue-259490424) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio 6 auto-generated project file (contains which files were open etc.) *.vbp # Visual Studio 6 workspace and project file (working project files containing files to include in project) *.dsw *.dsp # Visual Studio 6 technical files # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # Visual Studio History (VSHistory) files .vshistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # Fody - auto-generated XML schema FodyWeavers.xsd # VS Code files for those working on multiple tools .vscode/* !.vscode/settings.template.jsonc !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json *.code-workspace # Local History for Visual Studio Code .history/ # Windows Installer files from build outputs # JetBrains Rider *.sln.iml ### VisualStudio Patch ### # Additional files built by Visual Studio # End of https://www.toptal.com/developers/gitignore/api/macos,linux,windows,pycharm+all,visualstudio,intellij+all,python tmp rich-click-1.9.9/.prettierrc.yaml 0000664 0000000 0000000 00000000000 15247065310 0016660 0 ustar 00root root 0000000 0000000 rich-click-1.9.9/.rich-codex.yml 0000664 0000000 0000000 00000000060 15247065310 0016367 0 ustar 00root root 0000000 0000000 terminal_width: 80 working_dir: "." outputs: [] rich-click-1.9.9/.vscode/ 0000775 0000000 0000000 00000000000 15247065310 0015106 5 ustar 00root root 0000000 0000000 rich-click-1.9.9/.vscode/settings.template.jsonc 0000664 0000000 0000000 00000001046 15247065310 0021617 0 ustar 00root root 0000000 0000000 // Example settings file for VSCode with suggested settings. // Copy to `settings.jsonc` to use within VSCode { "python.defaultInterpreterPath": "venv/bin/python", "python.testing.pytestPath": "venv/bin/pytest", "python.linting.flake8Path": "venv/bin/flake8", "python.linting.flake8Enabled": true, "python.testing.pytestEnabled": true, "yaml.schemas": { "https://raw.githubusercontent.com/ewels/rich-codex/main/src/rich_codex/config-schema.yml": [ ".rich-codex.yml", ".rich-codex.yaml" ] } } rich-click-1.9.9/CHANGELOG.md 0000664 0000000 0000000 00000055131 15247065310 0015363 0 ustar 00root root 0000000 0000000 # Changelog ## Version 1.9.9 (2026-09-05) - Fixed `ctx.forward()` not working with commands patched via `rich_click.patch()`. [[#351](https://github.com/ewels/rich-click/pull/351)] (issue [#338](https://github.com/ewels/rich-click/issues/338)) - Added support for Click 8.5 (resolved `DeprecationWarning`s) [[#350](https://github.com/ewels/rich-click/pull/350)] ([@happykust](https://github.com/happykust)) Development tooling changes (no changes to the installed library): - Removed optional dependencies (`dev` and `docs`); swapped to [dependency groups](https://peps.python.org/pep-0735/) so they are no longer published as package metadata. - Switched from [pre-commit](https://pre-commit.com/) to [prek](https://github.com/j178/prek), and replaced `.pre-commit-config.yaml` with `prek.toml`. - Contributors should re-run `prek install` to replace their old git hook. - Replaced Black with `ruff format`. - Docs are now built with [ProperDocs](https://properdocs.org/) + other docs fixes. ## Version 1.9.8 (2026-05-28) - Fixed regression in patching with Click 8.4.0. - Warn about regression in Typer ≥0.26.0 patching. (No fix currently.) ## Version 1.9.7 (2026-01-30) - Fix `click_version` check when build metadata is included. [[#324](https://github.com/ewels/rich-click/pull/324)] ([@ccoulombe](https://github.com/ccoulombe)) ## Version 1.9.6 (2026-01-21) - Fix minor Typer incompatibilities, most notably default panel placements. - Added `default_panels_first` config option which places default panels above user-defined panels. - Fix to `.pyi` file [[#319](https://github.com/ewels/rich-click/pull/319)] ([@nemowang2003](https://github.com/nemowang2003)) ## Version 1.9.5 (2025-12-21) - Fix `no_args_is_help` for Typer CLIs. [[#313](https://github.com/ewels/rich-click/issues/313)] - Fix strange encoding issue on Windows in GH Actions [[#314](https://github.com/ewels/rich-click/issues/314)] ## Version 1.9.4 (2025-10-24) - Added Typer 0.20 support - Fix lack of support for `flag_value=...`. ## Version 1.9.3 (2025-10-09) - Fixed subcommand discovery in help text. Behavior should now be the same as `1.8`. [[#304](https://github.com/ewels/rich-click/pull/304)] ## Version 1.9.2 (2025-10-04) - Fixed legacy windows rendering - Fix issue with parent `click.Group` and child `rich_click.RichCommand` error formatter not resolving. - Add headers to tables (by default these are not shown). ## Version 1.9.1 (2025-09-20) - Fixed bug where running the `rich-click` CLI on a `@rich_click.argument()` sometimes caused arguments show up in the option panel when it shouldn't. - Slightly reduced horizontal padding of the `modern` theme format. - Fixed Click 8.3 compatibility with rendering defaults in help text. ## Version 1.9.0 (2025-09-16) > [!WARNING] > Version 1.9.0 deprecates support for a lot of old versions of things: > > - **Python 3.7 support is removed.** The minimum supported Python version is 3.8. > - **Click 7 support is removed.** The minimum supported Click version is 8.0. > - **Rich 10 and 11 support is removed.** The minimum supported Rich version is 12. > [!WARNING] > Version 1.9.0 introduces a minor breaking change: > The `DEFAULT_STRING`, `ENVVAR_STRING`, `REQUIRED_STRING`, and `DEPRECATED_STRING` config options are now rendered with `Text.from_markup`. > So for example, `REQUIRED_STRING = "[required]"` would be rendered as Rich markup. > You must now escape the rich markup: `REQUIRED_STRING = "\\[required]"` **Big changes:** - **Themes!** Check them out with `rich-click --themes`. - **Typer support:** `rich-click typer_app --help`. - **RichPanels** API introduced. This replaces the "groups" feature going forward (although groups will continue to be supported). - `@click.option_panel()` - `@click.command_panel()` - **IDE tab completion support for decorators**. Now you should no longer need to guess what goes in `@click.option()` or `@click.command(context_settings=...)` etc. - **Help for arguments:** `help=` is now a valid kwarg for `@click.argument()` decorator. See docs for more information. **Small changes:** - "Deprecated" text properly handled and stylized in all places. - Command aliases: `@cli.command(aliases=["foo"])` - Improved `rich-click` CLI usability: improved patching and improved script detection+execution. - `context_settings={"help_to_stderr": True}` support. - Added suite of `padding_*` config options to control padding. - Better newline handling: - Unordered lists create newlines in help text, e.g. `"\n- foo\n- bar"` or `"\n* foo\n* bar"` - Newline control in help text with `text_paragraph_linebreaks` config option. - Added a few `text_*` config options, including notably `text_kwargs` which can control code styles in Markdown. **Backend (mostly invisible) changes:** - Overhauled our test suite to use **inline-snapshot**! � - Improved test coverage and CI. - `typing_extensions` now only required for < Python 3.11. - `RichHelpFormatter` now defers printing by default if a user does not specify a Console. [[#231](https://github.com/ewels/rich-click/pull/231)] (With contributions from [@ofek](https://github.com/ofek)) - This more closely aligns the `RichHelpFormatter` with how base Click works. - Significant refactors to help text rendering. - Reintroduced deprecation warnings for a couple of features deprecated in 1.8. - There was an issue where the `rich.highlighter` module could load during CLI execution. We now assert in unit-tests that no `rich` modules are loaded during code execution, so going forward, `rich` imports should no longer ever be a side-effect of CLI execution. ## Version 1.8.9 (2025-05-19) Click 8.2 support: - Fix deprecation warning in Click 8.2. [[#239](https://github.com/ewels/rich-click/pull/239)] ([@finsberg](https://github.com/finsberg)) - Fix typing incompatibilities with Click 8.2. [[#240](https://github.com/ewels/rich-click/pull/240), [#242](https://github.com/ewels/rich-click/pull/242)] ([@finsberg](https://github.com/finsberg)) - Fixed `no_args_is_help=True` with Click 8.2: [[#241](https://github.com/ewels/rich-click/issues/241)] - Added Click 8.2's support for `Parameter.deprecated: str | bool` [[#242](https://github.com/ewels/rich-click/pull/242)] ## Version 1.8.8 (2025-03-09) - Make text wrap instead of using ellipses for overflowing metavars in options tables. - Added `--errors-in-output-format` flag to `rich-click` CLI. - Actually fixed regression in stderr handling [[#164](https://github.com/ewels/rich-click/issues/164)]. ## Version 1.8.7 (2025-03-08) - Add ability to turn off option/command deduplication in groups [[#226](https://github.com/ewels/rich-click/issues/226)] - Fix regression in stderr handling [[#164](https://github.com/ewels/rich-click/issues/164)] ## Version 1.8.6 (2025-02-19) - Fix incompatibility with click 8.2.0. [[#224](https://github.com/ewels/rich-click/pull/224)] ([@ppentchev](https://github.com/ppentchev)) ## Version 1.8.5 (2024-12-01) - Fix issue with error messages not using user-defined styles. [[#215](https://github.com/ewels/rich-click/pull/215)] ([@sankarngrjn](https://github.com/sankarngrjn)) ## Version 1.8.4 (2024-11-12) - Support `rich.text.Text()` objects for `header_text`, `footer_text`, `errors_suggestion`, and `errors_epilogue`. ## Version 1.8.3 (2023-06-09) - Support `{cmd}` as an option/command group key when `python -m {cmd}` is the command_path. - Fix yet another deprecation warning issue. (Sorry, sorry.) ## Version 1.8.2 (2023-05-14) - Fix another deprecation warning issue. ## Version 1.8.1 (2023-05-07) - Fixed bad deprecation warning with `highlighter` - Fixed incompatibility with Click 9. ## Version 1.8.0 (2023-04-30) - Add `--rich-config` and `--output` options to the `rich-click` CLI. - Lazy load Rich to reduce overhead when not rendering help text. [[#154](https://github.com/ewels/rich-click/pull/154)] - Some internal refactors. These refactors are aimed at making the abstractions more maintainable over time, more consistent, and more adept for advanced used cases. - `rich_click.py` is exclusively the global config; all formatting has been moved to `rich_help_rendering.py`. - `RichCommand` now makes use of methods in the super class: `format_usage`, `format_help_text`, `format_options`, and `format_epilog`. - Global `formatter` object has been removed from the code. - `highlighter` is now constructed by the `RichHelpFormatter` rather than being inside the config object. - Added `RichHelpConfiguration.load_from_globals()` classmethod, which pulls all configuration from `rich_click.py`. - Fix bug with regex highlighter for options and switches. - `RichHelpConfiguration()` is now asserted to be JSON serializable, as an option for porting configurations. That said, serialization is not a fully supported feature of the high-level API, so serialize the config at your own risk. - Related: `highlighter` is now deprecated in `RichHelpConfiguration`; please use `highlighter_patterns` instead. - Moved exclusively to `pyproject.toml` and removed `setup.py` / `setup.cfg`; thank you [@Stealthii](https://github.com/Stealthii)! - Moved to `text_markup: Literal["markdown", "rich", "ansi", None]` instead of booleans. - The default is now `ansi` instead of `None` to help support usage of `click.style()`. `None` is still supported. - Fixed issue where error messages would not print to `stderr` by default. - New configuration options: [[#178](https://github.com/ewels/rich-click/pull/178)] - `STYLE_OPTIONS_PANEL_BOX` - `STYLE_COMMANDS_PANEL_BOX` - `STYLE_ERRORS_PANEL_BOX` - Many quality of life improvements for command and option groups: - Support both `command_path` and `command.name`. - Added wildcard (`*`) option for command groups and option groups, with thanks to [@ITProKyle](https://github.com/ITProKyle)! - Resolve duplicates. - Better typing for option groups and command groups with `TypedDict` [[#156](https://github.com/ewels/rich-click/pull/156)] - Added `panel_styles` support to groups. [[#178](https://github.com/ewels/rich-click/pull/178)] - Allow `table_styles` and `panel_styles` to be defined for the positional arguments group. ## Version 1.7.4 (2024-03-12) - Fixed `legacy_windows` default. [[#167](https://github.com/ewels/rich-click/issues/167)] ## Version 1.7.3 (2024-01-05) - Fix false deprecation warning. [[#151](https://github.com/ewels/rich-click/issues/151)] ## Version 1.7.2 (2023-12-02) - Add support for rich formatting in epilog text [[#146](https://github.com/ewels/rich-click/pull/146)] ## Version 1.7.1 (2023-10-31) - Fix bug with `rich-click` CLI not working with Python 3.12. [[#141](https://github.com/ewels/rich-click/issues/141)] - Fix compatibility issue with `dbt-core` CLI. [[#140](https://github.com/ewels/rich-click/issues/140)] ## Version 1.7.0 (2023-10-11) > [!WARNING] > > Click 7.x support is deprecated and will be removed in a future version. > Please update to a newer version of click. This release comes after merging a huge pull-request from [@BrutalSimplicity](https://github.com/BrutalSimplicity) - see [#92](https://github.com/ewels/rich-click/pull/92) - Extends Click's `HelpFormatter` class - Creates a `HelpConfiguration` class that doubles the current module-level settings - Added a decorator that allows the `HelpConfiguration` to be passed into Click via the supported `context_settings` argument provided by the `Command` and `Group` classes. - The Rich Console object can also be configured per command and is distinct from the Console instance used internally by the formatter. The `RichHelpFormatter` creates a console based on the `RichHelpConfiguration` as the tight coupling between the Formatter and Click's internals make it difficult to allow the Console to be configured externally (i.e. one example is that Click expects help formatting to be buffered). - Created a `RichContext` class to allow creation of the custom formatter. - The Rich Command, Group, and Context now expose the `Console` and `RichHelpConfiguration` properties. - Added contributor VSCode settings This PR closes a number of issues: - [#25](https://github.com/ewels/rich-click/issues/25): Add tests! - [#90](https://github.com/ewels/rich-click/issues/90): `click.ClickException` should output to `stderr` - [#88](https://github.com/ewels/rich-click/issues/88): Rich Click breaks contract of Click's `format_help` and its callers - [#18](https://github.com/ewels/rich-click/issues/18): Options inherited from context settings aren't applied In addition, we merged another large pull-request that adds **full static type-checking support** (see issue [#85](https://github.com/ewels/rich-click/issues/85)), and fixes many bugs - see PR [#126](https://github.com/ewels/rich-click/pull/126). In addition: - Add new style option `STYLE_COMMAND` [[#102](https://github.com/ewels/rich-click/pull/102)] - Add new style option `WIDTH` (in addition to `MAX_WIDTH`), thanks to [@ealap](httpsd://github.com/ealap) [[#110](https://github.com/ewels/rich-click/pull/110)] - Add new style option `STYLE_ERRORS_SUGGESTION_COMMAND` [[#136](https://github.com/ewels/rich-click/pull/136)] - Updated styling for `Usage:` line to avoid off-target effects [[#108](https://github.com/ewels/rich-click/issues/108)] - Click 7.x support has been deprecated. [[#117](https://github.com/ewels/rich-click/pull/117)] - Fixed error where `ctx.exit(exit_code)` would not show nonzero exit codes.[[#114](https://github.com/ewels/rich-click/issues/114)] - Support `click.MultiCommand`. [[#38](https://github.com/ewels/rich-click/issues/38)]: ## Version 1.6.1 (2023-01-19) - Don't show metavars for [feature switch](https://click.palletsprojects.com/en/8.1.x/options/#feature-switches) options [[#100](https://github.com/ewels/rich-click/issues/100)] (@likewei92) ## Version 1.6.0 (2022-12-05) - ⚠� Removed support for Typer ⚠� - Please use the [native Typer functionality](https://typer.tiangolo.com/tutorial/options/help/#cli-options-help-panels) instead. - Added self-updating automated readme screengrabs using [rich-codex](https://github.com/ewels/rich-codex) - Fix `AssertionError` when using click command call [[#94](https://github.com/ewels/rich-click/issues/94)] ## Version 1.5.2 (2022-08-01) > [!NOTE] > > As of [Typer v0.6.0](https://typer.tiangolo.com/release-notes/#060), Typer now supports rich help text natively. > Support for Typer in rich-click is now depreciated and will be removed in a future release. - Pin Typer version to `<0.6` - Improve support for arguments [[#82](https://github.com/ewels/rich-click/pull/82)] - Fixes error with Typer arguments [[#59](https://github.com/ewels/rich-click/issues/59)] - Adds new style option `STYLE_ARGUMENT` - Don't show env vars if `None` [[#84](https://github.com/ewels/rich-click/issues/84)] - Specify `__all__` for type checkers [[#83](https://github.com/ewels/rich-click/pull/83)] ## Version 1.5.1 (2022-06-22) - Updated pip release build CI [[#78](https://github.com/ewels/rich-click/pull/78)] - Added missed occurence of return values when `standalone_mode` set [[#79](https://github.com/ewels/rich-click/pull/79)] ## Version 1.5.0 (2022-06-21) - Add new `FORCE_TERMINAL` config flag to force colours even when help output is piped - Can also be enabled by setting environment variables `GITHUB_ACTIONS`, `FORCE_COLOR` or `PY_COLORS` - Add new `OPTION_ENVVAR_FIRST` config flag to print environment variables before option help texts instead of after (nice for alignment if all options have an env var). - Refactor config flag `MAX_WIDTH` to set the console `width` and not individual panels - Can now also be set with environment variable `TERMINAL_WIDTH` - Fix package syntax in `setup.py` for `py.typed` [[#75](https://github.com/ewels/rich-click/pull/75)] - Fix printing of return values when `standalone_mode` set [[#76](https://github.com/ewels/rich-click/pull/76)] ## Version 1.4.0 (2022-05-17) - Added support for styling the tables that options and commands are displayed in [[#69](https://github.com/ewels/rich-click/issues/69)] - Fixed `AttributeError` from `envvar` code in some Typer usage [[#70](https://github.com/ewels/rich-click/pull/70)] ## Version 1.3.2 (2022-05-16) - Fix missed indentation issue in subcommand help text with `inspect.cleandoc` [[#67](https://github.com/ewels/rich-click/pull/67)] - Add support for showing Click / Typer `envvar` environment variables [[#36](https://github.com/ewels/rich-click/issues/36)] ## Version 1.3.1 (2022-05-15) - Bumped minimum version of `rich` from `10` to `10.7.0` (when `Group` was introduced) - Refactored CLI's patching functionality to support `from rich_click.cli import patch` [[#53](https://github.com/ewels/rich-click/issues/53)] - Make `_make_rich_rext` remove text indentations using `inspect.cleandoc` [[#55](https://github.com/ewels/rich-click/issues/55)] - Import `rich_click` into main namespace for Pylance [[#64](https://github.com/ewels/rich-click/issues/64)] - Add support of new click `hidden` command parameter [[#62](https://github.com/ewels/rich-click/pull/62)] - Don't show Typer positional arguments unless `SHOW_ARGUMENTS` is specified [[#59](https://github.com/ewels/rich-click/issues/59)] - Fix `\f` escape marker for new versions of Click, including in markdown [[#60](https://github.com/ewels/rich-click/issues/60)] - New config option `STYLE_COMMANDS_TABLE_COLUMN_WIDTH_RATIO` to fix column widths across groups [[#119](https://github.com/ewels/rich-click/issues/119)] ## Version 1.3.0 (2022-03-29) - Added initial support for [Typer](https://typer.tiangolo.com/) [[#26](https://github.com/ewels/rich-click/pull/26)] - Mark PEP 561 Compatibility [[#41](https://github.com/ewels/rich-click/pull/41)] - Distribution now available via MacPorts [[#42](https://github.com/ewels/rich-click/pull/42)] - Add typing information [[#39](https://github.com/ewels/rich-click/pull/39)] - Refactor `RichCommand` and `RichGroup` out of `rich_click` [[#38](https://github.com/ewels/rich-click/pull/39)] - Change metavar overflow to `fold`, so that large numbers of choices flow onto new lines instead of being truncated with an ellipsis [[#33](https://github.com/ewels/rich-click/issues/33)] - Make metavar separators dim (`[]`,`<>`) (customise with `STYLE_METAVAR_SEPARATOR`) - Add pre-commit config and a lot more linters (iSort, mypy, Flake8) [[#40](https://github.com/ewels/rich-click/pull/40)] - Monkey-patch `RichCommand` and `RichGroup` in CLI code for better `rich-click` compatibility with more tools [[#43](https://github.com/ewels/rich-click/pull/43)] - Parse emoji shortcodes `:partying_face:` [[#51](https://github.com/ewels/rich-click/pull/51)] - Pushed minimum version of Python up to 3.7, in line with [Click v8.1](https://click.palletsprojects.com/en/8.1.x/changes/#version-8-1-0) - Fixed bug where `--no-myflag` wasn't showing in the help [[#45](https://github.com/ewels/rich-click/issues/45)] ## Version 1.2.1 (2022-03-02) - Support the command `short_help` argument [[#28](https://github.com/ewels/rich-click/issues/28)] - Added `USE_CLICK_SHORT_HELP` global to enable default click shortening of help messages [[#28](https://github.com/ewels/rich-click/issues/28)] - Avoid `AttributeError` exceptions when using custom exception classes based on click that don't have `ctx` [[#27](https://github.com/ewels/rich-click/issues/27)] - Fix bug in inverted secondary options [[#31](https://github.com/ewels/rich-click/issues/31)] - Refactor printing options to handle arbitrary numbers of flags [[#32](https://github.com/ewels/rich-click/issues/32)] ## Version 1.2.0 (2022-02-28) - New CLI functionality to richifiy via prefix any other tool using click, by @pawamoy [[#13](https://github.com/ewels/rich-click/pull/13)] - Distribution now available via conda-forge ## Version 1.1.1 (2022-02-28) Hotfix patch release to remove an accidental `from turtle import st` that crept in due to a pesky VSCode plugin. Many thanks to [@ashb](httpsd://github.com/ashb) for spotting. ## Version 1.1.0 (2022-02-28) - Added support for `HEADER_TEXT` and `FOOTER_TEXT` to go before and after help output - Catch Abort exceptions from `cmd+c` and print nicely using `ABORTED_TEXT` - Handle missing `click.types._NumberRangeBase` in click 7x [[#16](https://github.com/ewels/rich-click/issues/16)] - Fix compatibility issue for rich 10.6 (`group` vs `render_group` import) [[#16](https://github.com/ewels/rich-click/issues/16)] - Require at least click v7.0 (released 2018) [[#16](https://github.com/ewels/rich-click/issues/16)] - Require at least rich v10 (released March 2021) [[#16](https://github.com/ewels/rich-click/issues/16)] - Unwrap single newlines in option and group-command help texts [[#23](https://github.com/ewels/rich-click/issues/23)] - Add click `\b` escape marker functionality into help text rendering [[#24](https://github.com/ewels/rich-click/issues/24)] - Fix syntax in example in README file by @fridex [[#15](https://github.com/ewels/rich-click/pull/15)] ## Version 1.0.0 (2022-02-18) - _**Major change:**_ New usage, so that we can avoid having to do monkey patching [[#10](https://github.com/ewels/rich-click/pull/10).] - Now use with `import rich_click as click` - Add ability to create groups of options with separate panels - Show positional arguments in their own panel by default - Add config `GROUP_ARGUMENTS_OPTIONS` option to group with options - Improve handing of metavars, give option to show appended instead of in column - Add `COLOR_SYSTEM` option to add ability to disable colours - Add options to customise error message help texts - Add support for printing errors nicely - A lot of additional testing and tweaking ## Version 0.3.0 (2022-02-13) - Add ability to create groups of commands with separate panels - Add support for rich console markup or Markdown in help texts - Set default for `MAX_WIDTH` to `None` instead of `100` - Switch boolean option `SKIP_ARGUMENTS` to `SHOW_ARGUMENTS` - Improve regular expression for flags like `-bg` - Use click's string for default value, instead of the value directly - Show some previously missed metavar types (eg. choice and range options) - Stripped required-asterisk column from options table if none are required ## Version 0.2.0 (2022-02-10) - Made most styling decisions configurable - Added support for more click parameters - Showing default values, showing if required, showing if deprecated, epilog - Option now hidden if set in click ## Version 0.1.2 (2022-02-10) - Seems to work fine on Python 3.6, so dropped the requirement down to this instead of Python 3.7 ## Version 0.1.1 (2022-02-10) - Fix a bug in `setup.cfg` that broke installation ## Version 0.1.0 (2022-02-09) Initial development version of `rich-click`, mostly as a proof of concept. Supports basic generic functionality for printing help from click commands and groups. Code was initially written by [@willmcgugan](https://github.com/willmcgugan) for `rich-cli` and then further developed by [@ewels](http://github.com/ewels/). rich-click-1.9.9/CONTRIBUTING.md 0000664 0000000 0000000 00000006137 15247065310 0016005 0 ustar 00root root 0000000 0000000 # Contributing Contributions and suggestions for new features are welcome, as are bug reports! Please create a new [issue](https://github.com/ewels/rich-click/issues) or better still, dive right in with a pull-request. ## Local setup Requirements: - `uv` https://docs.astral.sh/uv/getting-started/installation/ ```shell uv python pin 3.13 uv venv .venv source .venv/bin/activate uv sync --all-groups prek install ``` ## Prek We use [prek](https://github.com/j178/prek) to manage our git hooks. It is installed as part of `uv sync --all-groups`, and it is configured in [`prek.toml`](https://github.com/ewels/rich-click/blob/main/prek.toml). `prek install` sets up the git hook, so the checks run automatically whenever you commit. To run every hook against the whole repo without committing, use: ```shell prek run -a ``` > [!NOTE] > We used to use [pre-commit](https://pre-commit.com/) with a `.pre-commit-config.yaml` file. > If you set up your local checkout before that change, re-run `prek install` to replace the > old hook — otherwise the stale `pre-commit` hook will no longer find a config it recognises. `prek.toml` contains the following hooks: - [actionlint](https://github.com/rhysd/actionlint): lints our GitHub Actions workflow files. - [pyproject-fmt](https://pyproject-fmt.readthedocs.io/): formats and normalizes `pyproject.toml`. - [Ruff](https://docs.astral.sh/ruff/): does linting checks (including import sorting) and automatically fixes what it can. - [Ruff format](https://docs.astral.sh/ruff/formatter/): automatically formats your code to a standardized Python format. - [mypy](http://mypy-lang.org/): static type checker which verifies you are not using objects incorrectly. - [codespell](https://github.com/codespell-project/codespell): catches common spelling mistakes in the docs. As mentioned, some of these tools automatically fix your code while other only highlight potential issues. Sometimes it will be enough to try to commit a second time and it will pass, while other times it may require manual changes to your code. In rare cases it may be difficult or undesirable to change to code to pass the linting rules. If this happens, it's ok to add a Ruff `# noqa` or mypy `# type: ignore` comment to skip that line. For details of how to do this, please see the [Ruff docs](https://docs.astral.sh/ruff/linter/#error-suppression) and [mypy docs](https://mypy.readthedocs.io/en/stable/common_issues.html#spurious-errors-and-locally-silencing-the-checker). ## Credits This package was written by Phil Ewels ([@ewels](http://github.com/ewels/)), based on initial code by Will McGugan ([@willmcgugan](https://github.com/willmcgugan)). rich-click is co-maintained by Daniel Reeves ([@dwreeves](http://github.com/dwreeves/)). Furthermore, these contributors helped make the package what it is today: - [@BrutalSimplicity](https://github.com/BrutalSimplicity) - [@harens](http://github.com/harens/) - [@fridex](http://github.com/fridex/) - [@pawamoy](http://github.com/pawamoy/) - [@jorrick](http://github.com/harens/) See the full list of contributors [here](https://github.com/ewels/rich-click/graphs/contributors). rich-click-1.9.9/LICENSE 0000664 0000000 0000000 00000002053 15247065310 0014552 0 ustar 00root root 0000000 0000000 MIT License Copyright (c) 2022 Phil Ewels Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. rich-click-1.9.9/README.md 0000664 0000000 0000000 00000011340 15247065310 0015023 0 ustar 00root root 0000000 0000000
Richly rendered command line interfaces in click.
Documentation  Â·  Source Code  Â·  Changelog
--- **rich-click** is a wrapper around [Click](https://click.palletsprojects.com/) that renders help output nicely using [Rich](https://github.com/Textualize/rich). - Click is a _"Python package for creating beautiful command line interfaces"_. - Rich is a _"Python library for rich text and beautiful formatting in the terminal"_. The intention of `rich-click` is to provide attractive help output from Click, formatted with Rich, with minimal customization required. ## Features - 🌈 Rich command-line formatting of click help and error messages - 😌 Same API as Click: usage is simply `import rich_click as click` - 🎨 Over 100 themes that can be set by developers and end-users (`export RICH_CLICK_THEME=...`) - 💻 CLI tool to run on _other people's_ Click and Typer CLIs (prefix the command with `rich-click`) - 📦 Export help text as HTML or SVG - ðŸŽ� Group commands and options into named panels - â�Œ Well formatted error messages - 💫 Extensive customization - 🤖 IDE autocomplete of Click decorators for smooth developer experience ## Installation ```shell pip install rich-click ``` ## Examples ### Simple Example To use rich-click in your code, replace `import click` with `import rich_click as click` in your existing click CLI: ```python import rich_click as click @click.command() @click.option("--count", default=1, help="Number of greetings.") @click.option("--name", prompt="Your name", help="The person to greet.") def hello(count, name): """Simple program that greets NAME for a total of COUNT times.""" for _ in range(count): click.echo(f"Hello, {name}!") if __name__ == '__main__': hello() ```  _Screenshot from [`examples/11_hello.py`](https://github.com/ewels/rich-click/blob/main/examples/11_hello.py)_ ### More complex example **rich-click** has a ton of customization options that let you compose help text however you'd like. Below is a more complex example of what **rich-click** is capable of, utilizing **themes** and **panels**:  _Screenshot from [`examples/03_groups_sorting.py`](https://github.com/ewels/rich-click/blob/main/examples/03_groups_sorting.py)_ ## Usage This is a quick overview of how to use **rich-click**. [Read the docs](https://ewels.github.io/rich-click) for more information. There are a couple of ways to begin using `rich-click`: ### Import `rich_click` as `click` Switch out your normal `click` import with `rich_click`, using the same namespace: ```python import rich_click as click ``` That's it! ✨ Then continue to use Click as you would normally. > See [`examples/01_simple.py`](https://github.com/ewels/rich-click/blob/main/examples/01_simple.py) for an example. ### Declarative If you prefer, you can use `RichGroup` or `RichCommand` with the `cls` argument in your click usage instead. This means that you can continue to use the unmodified `click` package in parallel. ```python import click from rich_click import RichCommand @click.command(cls=RichCommand) def main(): """My amazing tool does all the things.""" ``` > See [`examples/02_declarative.py`](https://github.com/ewels/rich-click/blob/main/examples/02_declarative.py) for an example. ### `rich-click` CLI tool **rich-click** comes with a CLI tool that allows you to format the Click help output from _any_ package that uses Click. To use, prefix `rich-click` to your normal command. For example, to get richified Click help text from a package called `awesometool`, you could run: ```console $ rich-click awesometool --help Usage: awesometool [OPTIONS] ..more richified output below.. ``` ## License This project is licensed under the MIT license. rich-click-1.9.9/docs/ 0000775 0000000 0000000 00000000000 15247065310 0014475 5 ustar 00root root 0000000 0000000 rich-click-1.9.9/docs/_deploy.py 0000664 0000000 0000000 00000002465 15247065310 0016511 0 ustar 00root root 0000000 0000000 # fmt: off # /// script # requires-python = ">=3.13" # dependencies = [ # "packaging" # ] # /// import os from importlib.metadata import version import subprocess import json import packaging.version def get_latest(): res = subprocess.run(["mike", "list", "latest", "-j"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True,) if not res.stdout: # First deploy return None data = json.loads(res.stdout) major, minor, *_ = data["version"].split(".") return int(major), int(minor) def deploy(): subprocess.run( ["git", "fetch", "origin", "gh-pages:gh-pages"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True ) v = packaging.version.parse(version(os.environ["PACKAGE_NAME"])) latest = get_latest() cmd = ["mike", "deploy", "--push", "--update-aliases", f"{v.major}.{v.minor}"] if v.is_prerelease: cmd.append("prerelease") elif latest is None or (v.major, v.minor) > latest: cmd.append("latest") print(f"Running {' '.join(cmd)}") subprocess.run( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True ) subprocess.run([ "mike", "set-default", "--push", "latest"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False ) if __name__ == "__main__": deploy() rich-click-1.9.9/docs/assets/ 0000775 0000000 0000000 00000000000 15247065310 0015777 5 ustar 00root root 0000000 0000000 rich-click-1.9.9/docs/assets/fonts/ 0000775 0000000 0000000 00000000000 15247065310 0017130 5 ustar 00root root 0000000 0000000 rich-click-1.9.9/docs/assets/fonts/pixelmix.ttf 0000664 0000000 0000000 00000053250 15247065310 0021513 0 ustar 00root root 0000000 0000000 € PFFTM\™b VŒ GDEFÒ $ Vd (OS/2fw X `cmapoÚàž @ ®gaspÿÿ V\ glyf·Ì ¢ 8 8@headù¼„7 Ü 6hhea¡ $hmtx®€ ¸ †locaÈ™Ö0 ð Hmaxp &