-
Couldn't load subscription status.
- Fork 1
Description
from schema_models.creative_work import CreativeWork
def test_creative_work_name():
c = CreativeWork(awards="awardtest")The above test results in
E TypeError: Thing.__init__() got an unexpected keyword argument 'awards'
I haven't used the fquery.pydantic decorator before exploring this library, so my knowledge on it is limited. Based on the error, I'd guess all classes that are not base classesand are broken because they do not have the fquery.pydantic decorator. The decorator seems to only be only recognizing the base class when I use the subclasses.
Should all of the schema-org subclasses also use the fquery.pydantic decorator? I ran a few tests and it seemed to work when I did this. Is there any reason why the decorator isn't used on subclasses currently?
I also think it'd be worth documenting this repository isn't strictly pydantic classes, rather it is using fquery to build dataclass/pydantic classes.
I think this is an interesting and useful project. I'm interested in using it and contributing back to the library.