From 7ab915d418dc18114485d0ecf2e79a609b6c91e5 Mon Sep 17 00:00:00 2001 From: Kush Dubey Date: Thu, 10 Oct 2024 21:47:21 -0700 Subject: [PATCH 1/2] Fix #150 --- tests/test_to_tap_class.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_to_tap_class.py b/tests/test_to_tap_class.py index 7c30da6..2bc10f7 100644 --- a/tests/test_to_tap_class.py +++ b/tests/test_to_tap_class.py @@ -24,9 +24,14 @@ _IS_PYDANTIC_V1 = Version(pydantic.__version__) < Version("2.0.0") -# To properly test the help message, we need to know how argparse formats it. It changed from 3.8 -> 3.9 -> 3.10 +# To properly test the help message, we need to know how argparse formats it. It changed from 3.8 -> 3.9 -> 3.10 -> 3.13 _OPTIONS_TITLE = "options" if not sys.version_info < (3, 10) else "optional arguments" _ARG_LIST_DOTS = "..." if not sys.version_info < (3, 9) else "[ARG_LIST ...]" +_ARG_WITH_ALIAS = ( + "-arg, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME" + if not sys.version_info < (3, 13) + else "-arg ARGUMENT_WITH_REALLY_LONG_NAME, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME" +) @dataclasses.dataclass @@ -416,7 +421,7 @@ def test_subclasser_complex_help_message(class_or_function_: Any): {description} {_OPTIONS_TITLE}: - -arg ARGUMENT_WITH_REALLY_LONG_NAME, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME + {_ARG_WITH_ALIAS} (Union[float, int], default=3) This argument has a long name and will be aliased with a short one --arg_int ARG_INT (int, required) some integer From 00dcff83141eca9153413f8f6714224dee4fdeb7 Mon Sep 17 00:00:00 2001 From: Kush Dubey Date: Thu, 10 Oct 2024 21:58:30 -0700 Subject: [PATCH 2/2] Add Python 3.13 to the testing workflow --- .github/workflows/tests.yml | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8f4b3b6..6585066 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@main diff --git a/pyproject.toml b/pyproject.toml index d272ae0..d802aec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Typing :: Typed",