Skip to content

Commit 19e6c66

Browse files
committed
🔧 refactor(argparse_typing.py, query_command.py): initialize optional fields to None by default to avoid potential NoneType errors
1 parent da87d68 commit 19e6c66

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎convex_api/tool/command/argparse_typing.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def __call__(self, parser: ArgumentParser, namespace: Namespace, values: Any, op
2828

2929

3030
class BaseArgs(BaseModel):
31-
keyfile: Union[None, str]
32-
keytext: Union[None, str]
33-
password: Union[None, str]
34-
keywords: Union[None, str]
31+
keyfile: Union[None, str] = None
32+
keytext: Union[None, str] = None
33+
password: Union[None, str] = None
34+
keywords: Union[None, str] = None
3535
debug: bool = False
3636
output_json: bool = Field(alias='json', default=False)
3737
url: str

‎convex_api/tool/command/query_command.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class QueryArgs(BaseArgs):
2222
command: Literal['query']
2323
query: str
24-
name_address: Union[str, int, None]
24+
name_address: Union[str, int, None] = None
2525

2626

2727
class QueryCommand(CommandBase):

0 commit comments

Comments
 (0)