Skip to content

Commit 778249c

Browse files
committed
Use: V2Argument.
1 parent b654819 commit 778249c

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

cmdcomp/v2/command/__init__.py

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
from pydantic import ConfigDict, Field
44

55
from cmdcomp.model import Model
6-
from cmdcomp.v2.command.argument.command_argument import V2CommandArgument
7-
from cmdcomp.v2.command.argument.file_argument import V2FileArgument
86
from cmdcomp.v2.command.argument.flag_argument import V2FlagArgument
97
from cmdcomp.v2.command.argument.values_argument import (
108
V2ValueArgument,
@@ -37,13 +35,7 @@ class V2PoristionalArgumentsCommand(Model):
3735
arguments: Annotated[
3836
OrderedDict[
3937
Position | Literal["*"] | Keyword,
40-
str
41-
| list[str]
42-
| V2ValuesArgument
43-
| V2FileArgument
44-
| V2CommandArgument
45-
| V2FlagArgument
46-
| None,
38+
str | list[str] | V2Argument | None,
4739
],
4840
Field(
4941
title="arguments of the command.",
@@ -138,13 +130,7 @@ class V2SubcommandsCommand(Model):
138130
arguments: Annotated[
139131
OrderedDict[
140132
Keyword,
141-
str
142-
| list[str]
143-
| V2ValuesArgument
144-
| V2FileArgument
145-
| V2CommandArgument
146-
| V2FlagArgument
147-
| None,
133+
str | list[str] | V2Argument | None,
148134
],
149135
Field(
150136
title="arguments of the command.",
@@ -212,13 +198,7 @@ def has_keyword_arguments(self) -> bool:
212198

213199

214200
def _convert_argument(
215-
value: str
216-
| list[str]
217-
| V2ValuesArgument
218-
| V2FileArgument
219-
| V2CommandArgument
220-
| V2FlagArgument
221-
| None,
201+
value: str | list[str] | V2Argument | None,
222202
) -> V2Argument:
223203
match value:
224204
case str():

0 commit comments

Comments
 (0)