Package Details: python-rich-click 1.8.5-1

Git Clone URL: https://aur.archlinux.org/python-rich-click.git (read-only, click to copy)
Package Base: python-rich-click
Description: Python module to format click help output nicely with Rich.
Upstream URL: https://github.com/ewels/rich-click
Keywords: cli formatting library output python
Licenses: MIT
Submitter: GI_Jack
Maintainer: Dominiquini
Last Packager: Dominiquini
Votes: 2
Popularity: 0.46
First Submitted: 2022-06-28 16:37 (UTC)
Last Updated: 2024-12-06 14:23 (UTC)

Latest Comments

agarbathi commented on 2024-02-19 22:16 (UTC)

Do you have any system-wide or user-wide pytest configuration that enables Mypy?

At least I can't answer that question at the moment. But I was able to install python-rich-click after uninstalling mypy, python-pytest-mypy.

carsme commented on 2024-02-16 09:01 (UTC)

@agarbathi I can reproduce the Mypy failure if I run Mypy directly on the code, but I don't understand why your system runs Mypy during the package build. Do you have any system-wide or user-wide pytest configuration that enables Mypy?

agarbathi commented on 2024-02-14 21:39 (UTC)

I'm sorry for my late response - this is a part of the Install/update log.

tests/test_exit_code.py::BLACK PASSED
tests/conftest.py::mypy PASSED
tests/__init__.py::mypy-status FAILED
tests/conftest.py::BLACK PASSED
tests/__init__.py::mypy PASSED
tests/test_exit_code.py::mypy PASSED
tests/__init__.py::BLACK PASSED
tests/test_help.py::mypy FAILED
tests/test_help.py::BLACK PASSED
tests/fixtures/context_settings.py::mypy PASSED
tests/fixtures/groups_sorting.py::mypy PASSED
tests/fixtures/arguments.py::mypy PASSED
tests/fixtures/custom_errors.py::BLACK PASSED
tests/fixtures/metavars.py::BLACK PASSED
tests/fixtures/arguments.py::BLACK PASSED
tests/fixtures/metavars.py::mypy PASSED
tests/fixtures/declarative.py::BLACK PASSED
tests/fixtures/rich_markup.py::mypy PASSED
tests/fixtures/table_styles.py::mypy PASSED
tests/fixtures/rich_markup.py::BLACK PASSED
tests/fixtures/table_alignment.py::BLACK PASSED
tests/fixtures/table_styles.py::BLACK PASSED
tests/fixtures/markdown.py::BLACK PASSED
tests/fixtures/metavars_default.py::BLACK PASSED
tests/fixtures/context_settings.py::BLACK PASSED
tests/fixtures/table_alignment.py::mypy PASSED
tests/fixtures/simple.py::BLACK PASSED
tests/fixtures/declarative.py::mypy PASSED
tests/fixtures/custom_errors.py::mypy PASSED
tests/fixtures/simple.py::mypy PASSED
tests/fixtures/groups_sorting.py::BLACK PASSED
tests/fixtures/markdown.py::mypy PASSED
tests/fixtures/envvar.py::BLACK PASSED
tests/fixtures/metavars_default.py::mypy PASSED
tests/fixtures/envvar.py::mypy PASSED

=========================================================================================================== FAILURES ===========================================================================================================
_________________________________________________________________________________________________________ test session _________________________________________________________________________________________________________
mypy exited with status 1.
______________________________________________________________________________________________________ tests/test_help.py ______________________________________________________________________________________________________
20: error: Unused "type: ignore[import-not-found]" comment  [unused-ignore]
======================================================================================================= warnings summary =======================================================================================================
../../../../../../../../usr/lib/python3.11/site-packages/_pytest/nodes.py:147: 18 warnings
  /usr/lib/python3.11/site-packages/_pytest/nodes.py:147: PytestDeprecationWarning: <class 'pytest_black.BlackItem'> is not using a cooperative constructor and only takes {'fspath', 'parent'}.
  See https://docs.pytest.org/en/stable/deprecations.html#constructors-of-custom-pytest-node-subclasses-should-take-kwargs for more details.
    warnings.warn(

../../../../../../../../usr/lib/python3.11/site-packages/_pytest/nodes.py:264: 18 warnings
  /usr/lib/python3.11/site-packages/_pytest/nodes.py:264: PytestRemovedIn8Warning: The (fspath: py.path.local) argument to BlackItem is deprecated. Please use the (path: pathlib.Path) argument instead.
  See https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
    return cls._create(parent=parent, **kw)

../../../../../../../../usr/lib/python3.11/site-packages/_pytest/nodes.py:724
  /usr/lib/python3.11/site-packages/_pytest/nodes.py:724: PytestWarning: BlackItem is an Item subclass and should not be a collector, however its bases File are collectors.
  Please split the Collectors and the Item into separate node types.
  Pytest Doc example: https://docs.pytest.org/en/latest/example/nonpython.html
  example pull request on a plugin: https://github.com/asmeurer/pytest-flakes/pull/40/
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================================================ PASSES ============================================================================================================

---------- coverage: platform linux, python 3.11.7-final-0 -----------
Name                                        Stmts   Miss Branch BrPart  Cover
-----------------------------------------------------------------------------
src/rich_click/__init__.py                     80      8      2      0    88%
src/rich_click/_compat_click.py                13      4      2      1    67%
src/rich_click/decorators.py                   82     15     36      5    83%
src/rich_click/rich_click.py                  378     54    178     30    82%
src/rich_click/rich_command.py                141     56     74      9    59%
src/rich_click/rich_context.py                 18      0      4      0   100%
src/rich_click/rich_help_configuration.py     119      7     21      2    92%
src/rich_click/rich_help_formatter.py          34      1      8      0    98%
src/rich_click/utils.py                        11      9      8      0    11%
-----------------------------------------------------------------------------
TOTAL                                         876    154    333     47    79%

============================================================================================================= mypy =============================================================================================================
Found 1 error in 1 file (checked 17 source files)
=============================================================================== 2 failed, 83 passed, 1 skipped, 37 warnings in 163.16s (0:02:43) ===============================================================================
==> FEHLER: Ein Fehler geschah in check().
    Breche ab...
Fehler: ‚python-rich-click-1.7.3-2‘ konnte nicht erstellt werden: 
Fehler: Pakete konnten nicht erstellt werden: python-rich-click-1.7.3-2

carsme commented on 2024-01-18 19:00 (UTC)

@agarbathi I cannot reproduce any test failures, would you mind posting a log that includes which tests failed? Thanks.

agarbathi commented on 2024-01-17 21:08 (UTC)

Found 1 error in 1 file (checked 17 source files)
=============================================================================== 2 failed, 83 passed, 1 skipped, 37 warnings in 155.06s (0:02:35) ===============================================================================
==> FEHLER: Ein Fehler geschah in check().
    Breche ab...
Fehler: ‚python-rich-click-1.7.3-2‘ konnte nicht erstellt werden: 
Fehler: Pakete konnten nicht erstellt werden: python-rich-click-1.7.3-2

carsme commented on 2024-01-08 11:45 (UTC)

Hey, some suggested changes to the PKGBUILD:

  • Set license=('any') - this is a pure Python package and as such architecture independent.
  • Add testing, see below.
  • Install license - MIT licenses must be installed as they are considered bespoke for each project.
  • Use the PEP 517 way of building/installing the package, see below.
  • Remove python-importlib-metadata dependency, only needed for Python < 3.8.

Here's a PKGBUILD with the suggested changes applied:

pkgname=python-rich-click
_pkgname=rich-click
pkgver=1.7.3
pkgrel=1
pkgdesc="Python module to format click help output nicely with Rich."
arch=('any')
url="https://github.com/ewels/rich-click"
license=('MIT')
depends=(
  'python'
  'python-click'
  'python-rich'
  'python-typing-extensions'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)
checkdepends=(
  'python-pytest'
)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('a55419359e4b30da0cf3156977885b784530edaf648030f509acb165fb8fb589')

build() {
  cd "${_pkgname}-${pkgver}"

  python -m build --wheel --no-isolation
}

check() {
  cd "${_pkgname}-${pkgver}"

  pytest
}

package() {
  cd "${_pkgname}-${pkgver}"

  python -m installer --destdir="${pkgdir}" dist/*.whl

  install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}

Feel free to add me as co-maintainer if you'd like. Thanks!