Skip to content

Fix #150 #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 7 additions & 2 deletions tests/test_to_tap_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading