From 4aa4e6905a69db0fed115f54ea8007d0c316f344 Mon Sep 17 00:00:00 2001 From: Mauricio Villegas <5780272+mauvilsa@users.noreply.github.com> Date: Thu, 30 Jan 2025 07:04:37 +0100 Subject: [PATCH 1/3] Improve description of check command. --- twine/commands/check.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/twine/commands/check.py b/twine/commands/check.py index 47d15a17..e9ed78ac 100644 --- a/twine/commands/check.py +++ b/twine/commands/check.py @@ -114,9 +114,11 @@ def check( ) -> bool: """Check that a distribution will render correctly on PyPI and display the results. - This is currently only validates ``long_description``, but more checks could be + This currently only validates ``long_description``, but more checks could be added. + Note: check is not intended to catch all reasons why an upload to PyPI might fail. + :param dists: The distribution files to check. :param output_stream: @@ -168,6 +170,11 @@ def check( def main(args: List[str]) -> bool: """Execute the ``check`` command. + This currently only validates ``long_description``, but more checks could be + added. + + Note: check is not intended to catch all reasons why an upload to PyPI might fail. + :param args: The command-line arguments. From 0b69c0b049e4375d2a2f47e09d63401071d84b7a Mon Sep 17 00:00:00 2001 From: Mauricio Villegas <5780272+mauvilsa@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:51:25 +0100 Subject: [PATCH 2/3] Fix ArgumentParser description --- twine/commands/check.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/twine/commands/check.py b/twine/commands/check.py index e9ed78ac..96d18688 100644 --- a/twine/commands/check.py +++ b/twine/commands/check.py @@ -170,18 +170,19 @@ def check( def main(args: List[str]) -> bool: """Execute the ``check`` command. - This currently only validates ``long_description``, but more checks could be - added. - - Note: check is not intended to catch all reasons why an upload to PyPI might fail. - :param args: The command-line arguments. :return: The exit status of the ``check`` command. """ - parser = argparse.ArgumentParser(prog="twine check") + description = """ + This currently only validates ``long_description``, but more checks could be + added. + + Note: check is not intended to catch all reasons why an upload to PyPI might fail. + """ + parser = argparse.ArgumentParser(prog="twine check", description=description) parser.add_argument( "dists", nargs="+", From 470a0deb149b7954ef42c313342803e5726387db Mon Sep 17 00:00:00 2001 From: Mauricio Villegas <5780272+mauvilsa@users.noreply.github.com> Date: Mon, 3 Feb 2025 20:54:21 +0100 Subject: [PATCH 3/3] Update twine/commands/check.py Co-authored-by: Ian Stapleton Cordasco --- twine/commands/check.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/twine/commands/check.py b/twine/commands/check.py index 96d18688..08d9c096 100644 --- a/twine/commands/check.py +++ b/twine/commands/check.py @@ -176,11 +176,14 @@ def main(args: List[str]) -> bool: :return: The exit status of the ``check`` command. """ - description = """ - This currently only validates ``long_description``, but more checks could be - added. - - Note: check is not intended to catch all reasons why an upload to PyPI might fail. + description = """This currently only validates if long_description will render on PyPI. + + ** Caution: This does **not** verify everything that PyPI will. + + ** Caution: This **never** verifies anything pertinent to non-PyPI index behaviour. + + By virtue of performing rendering checks on the long_description, this may validate + other metadata characteristics loosely. """ parser = argparse.ArgumentParser(prog="twine check", description=description) parser.add_argument(