33from typing import Annotated , Literal , OrderedDict , TypeAlias
44
55from pydantic import ConfigDict , Field
6+ from typing_extensions import override
67
78from cmdcomp .model import Model
89from cmdcomp .v2 .command .argument .flag_argument import V2FlagArgument
@@ -110,10 +111,12 @@ class V2PoristionalArgumentsCommand(_V2BaseCommand):
110111 ]
111112
112113 @property
114+ @override
113115 def subcommands (self ) -> OrderedDict [SubcommandName , "V2Command" ]:
114116 return OrderedDict ()
115117
116118 @cached_property
119+ @override
117120 def positional_arguments (self ) -> OrderedDict [Position , V2Argument ]:
118121 return OrderedDict (
119122 [
@@ -124,13 +127,15 @@ def positional_arguments(self) -> OrderedDict[Position, V2Argument]:
124127 )
125128
126129 @cached_property
130+ @override
127131 def positional_wildcard_argument (self ) -> V2Argument | None :
128132 if "*" in self .arguments :
129133 return _convert_argument (self .arguments ["*" ])
130134 else :
131135 return None
132136
133137 @cached_property
138+ @override
134139 def keyword_arguments (self ) -> OrderedDict [Keyword , V2Argument ]:
135140 return OrderedDict (
136141 [
@@ -141,18 +146,22 @@ def keyword_arguments(self) -> OrderedDict[Keyword, V2Argument]:
141146 )
142147
143148 @property
149+ @override
144150 def has_subcommands (self ) -> bool :
145151 return False
146152
147153 @property
154+ @override
148155 def has_positional_arguments (self ) -> bool :
149156 return len (self .positional_arguments ) != 0
150157
151158 @property
159+ @override
152160 def has_positional_wildcard_argument (self ) -> bool :
153161 return self .positional_wildcard_argument is not None
154162
155163 @property
164+ @override
156165 def has_keyword_arguments (self ) -> bool :
157166 return len (self .keyword_arguments ) != 0
158167
@@ -174,14 +183,17 @@ class V2SubcommandsCommand(_V2BaseCommand):
174183 )
175184
176185 @property
186+ @override
177187 def positional_arguments (self ) -> OrderedDict [Position , V2Argument ]:
178188 return OrderedDict ()
179189
180190 @property
191+ @override
181192 def positional_wildcard_argument (self ) -> V2Argument | None :
182193 return None
183194
184195 @cached_property
196+ @override
185197 def keyword_arguments (self ) -> OrderedDict [Keyword , V2Argument ]:
186198 return OrderedDict (
187199 [
@@ -192,6 +204,7 @@ def keyword_arguments(self) -> OrderedDict[Keyword, V2Argument]:
192204 )
193205
194206 @cached_property
207+ @override
195208 def subcommands (self ) -> OrderedDict [SubcommandName , "V2Command" ]:
196209 return OrderedDict (
197210 [
@@ -206,18 +219,22 @@ def subcommands(self) -> OrderedDict[SubcommandName, "V2Command"]:
206219 )
207220
208221 @property
222+ @override
209223 def has_subcommands (self ) -> bool :
210224 return len (self .subcommands ) != 0
211225
212226 @property
227+ @override
213228 def has_positional_arguments (self ) -> bool :
214229 return False
215230
216231 @property
232+ @override
217233 def has_positional_wildcard_argument (self ) -> bool :
218234 return self .positional_wildcard_argument is not None
219235
220236 @property
237+ @override
221238 def has_keyword_arguments (self ) -> bool :
222239 return len (self .keyword_arguments ) != 0
223240
0 commit comments