Skip to content

Commit 69d2f0a

Browse files
authored
Merge pull request #151 from kddubey/to-tap-class-fix-py313
Fix #150
2 parents 1a3af2a + 00dcff8 commit 69d2f0a

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Diff for: .github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, macos-latest, windows-latest]
19-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
19+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
2020

2121
steps:
2222
- uses: actions/checkout@main

Diff for: pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ classifiers = [
2929
"Programming Language :: Python :: 3.10",
3030
"Programming Language :: Python :: 3.11",
3131
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: 3.13",
3233
"License :: OSI Approved :: MIT License",
3334
"Operating System :: OS Independent",
3435
"Typing :: Typed",

Diff for: tests/test_to_tap_class.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@
2424
_IS_PYDANTIC_V1 = Version(pydantic.__version__) < Version("2.0.0")
2525

2626

27-
# To properly test the help message, we need to know how argparse formats it. It changed from 3.8 -> 3.9 -> 3.10
27+
# 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
2828
_OPTIONS_TITLE = "options" if not sys.version_info < (3, 10) else "optional arguments"
2929
_ARG_LIST_DOTS = "..." if not sys.version_info < (3, 9) else "[ARG_LIST ...]"
30+
_ARG_WITH_ALIAS = (
31+
"-arg, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME"
32+
if not sys.version_info < (3, 13)
33+
else "-arg ARGUMENT_WITH_REALLY_LONG_NAME, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME"
34+
)
3035

3136

3237
@dataclasses.dataclass
@@ -416,7 +421,7 @@ def test_subclasser_complex_help_message(class_or_function_: Any):
416421
{description}
417422
418423
{_OPTIONS_TITLE}:
419-
-arg ARGUMENT_WITH_REALLY_LONG_NAME, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME
424+
{_ARG_WITH_ALIAS}
420425
(Union[float, int], default=3) This argument has a long name and will be aliased with a short
421426
one
422427
--arg_int ARG_INT (int, required) some integer

0 commit comments

Comments
 (0)