File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 24
24
_IS_PYDANTIC_V1 = Version (pydantic .__version__ ) < Version ("2.0.0" )
25
25
26
26
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
28
28
_OPTIONS_TITLE = "options" if not sys .version_info < (3 , 10 ) else "optional arguments"
29
29
_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
+ )
30
35
31
36
32
37
@dataclasses .dataclass
@@ -416,7 +421,7 @@ def test_subclasser_complex_help_message(class_or_function_: Any):
416
421
{ description }
417
422
418
423
{ _OPTIONS_TITLE } :
419
- -arg ARGUMENT_WITH_REALLY_LONG_NAME, --argument_with_really_long_name ARGUMENT_WITH_REALLY_LONG_NAME
424
+ { _ARG_WITH_ALIAS }
420
425
(Union[float, int], default=3) This argument has a long name and will be aliased with a short
421
426
one
422
427
--arg_int ARG_INT (int, required) some integer
You can’t perform that action at this time.
0 commit comments