From 11ff5c733060a8c14b762e7e2939e8c8fb0acc46 Mon Sep 17 00:00:00 2001 From: Shantanu Biswas <155043274+shantanucoder@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:01:10 +0530 Subject: [PATCH 1/2] Update setup.py clear clarification about the code below the docs string --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b825adb44..33870daaf 100755 --- a/setup.py +++ b/setup.py @@ -47,9 +47,10 @@ def read_description(): "//readthedocs.org/projects/python-chess/badge/?version=latest", "//readthedocs.org/projects/python-chess/badge/?version=v{}".format(chess.__version__)) - # Remove doctest comments. + # Remove doctest-specific comments from the README for cleaner output. description = re.sub(r"\s*# doctest:.*", "", description) + return description From 142688d40b04415479527ca67221c93ef24c0b3d Mon Sep 17 00:00:00 2001 From: Shantanu Biswas <155043274+shantanucoder@users.noreply.github.com> Date: Mon, 6 Jan 2025 18:28:22 +0530 Subject: [PATCH 2/2] Update release.py Added a Docstring: Helps other developers understand what the function does. Improved Logging: Prints a clear message indicating what command is being executed and why the script is exiting, which is helpful for debugging. --- release.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/release.py b/release.py index 4057ab785..1fb82fed7 100755 --- a/release.py +++ b/release.py @@ -8,9 +8,11 @@ def system(command): - print(command) + """Execute a system command and exit if it fails.""" + print(f"Executing: {command}") exit_code = os.system(command) if exit_code != 0: + print(f"Command failed with exit code {exit_code}. Exiting.") sys.exit(exit_code)