@@ -90,6 +90,48 @@ def has_keyword_arguments(self) -> bool:
9090 ...
9191
9292
93+ class _V2EmptyCommand (_V2BaseCommand ):
94+ @property
95+ @override
96+ def subcommands (self ) -> OrderedDict [SubcommandName , "V2Command" ]:
97+ return OrderedDict ()
98+
99+ @property
100+ @override
101+ def positional_arguments (self ) -> OrderedDict [Position , V2Argument ]:
102+ return OrderedDict ()
103+
104+ @property
105+ @override
106+ def positional_wildcard_argument (self ) -> V2Argument | None :
107+ return None
108+
109+ @property
110+ @override
111+ def keyword_arguments (self ) -> OrderedDict [Keyword , V2Argument ]:
112+ return OrderedDict ()
113+
114+ @property
115+ @override
116+ def has_subcommands (self ) -> bool :
117+ return False
118+
119+ @property
120+ @override
121+ def has_positional_arguments (self ) -> bool :
122+ return False
123+
124+ @property
125+ @override
126+ def has_positional_wildcard_argument (self ) -> bool :
127+ return False
128+
129+ @property
130+ @override
131+ def has_keyword_arguments (self ) -> bool :
132+ return False
133+
134+
93135class V2PoristionalArgumentsCommand (_V2BaseCommand ):
94136 arguments : Annotated [
95137 OrderedDict [Position | Literal ["*" ] | Keyword , _InputArgument | None ],
@@ -228,7 +270,28 @@ def has_keyword_arguments(self) -> bool:
228270 return len (self .keyword_arguments ) != 0
229271
230272
231- V2Command = V2PoristionalArgumentsCommand | V2SubcommandsCommand
273+ class V2RelayCommand (_V2EmptyCommand ):
274+ """relay completion of other command."""
275+
276+ type : Annotated [
277+ Literal ["relay" ],
278+ Field (title = "relay completion of other command." ),
279+ ]
280+
281+ description : Annotated [
282+ str | None ,
283+ Field (title = "description of the argument." ),
284+ ] = None
285+
286+ alias : Annotated [
287+ str | list [str ] | None ,
288+ Field (title = "alias of the argument." ),
289+ ] = None
290+
291+ target : Annotated [str , Field (title = "relay target." )]
292+
293+
294+ V2Command = V2PoristionalArgumentsCommand | V2SubcommandsCommand | V2RelayCommand
232295
233296
234297def _convert_argument (value : _InputArgument | None ) -> V2Argument :
0 commit comments