-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Here is the code:
`
from typing import Dict, List
from pydantic import BaseModel
from argdantic import ArgParser
class Dataset(BaseModel):
tile_size: List[Dict[int, int]] = [{"x": "1", "y": "1"}]
cli = ArgParser()
@cli.command()
def create_item(dataset: Dataset = Dataset()):
print(dataset)
if name == "main":
cli()
`
When I execute: python test.py --dataset.tile-size '{"x":"2"}' ,
an error occurred:
usage: test.py [-h] [--dataset.tile-size [JSON ...]]
test.py: error: argument --dataset.tile-size: invalid dict value: '{"x":"2"}'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels