Closed CM-BF closed 6 months ago
I also tried setting the type of dataset to a super class of Calendar:
def __init__(self, dataset: CalendarBase):
When I wrongly define the return_class type as:
class_from_function(Calendar.from_str, AnotherClass, name="CalendarFromStr") # AnotherClass instead of CalendarBase or Calendar
instead of telling me the class mismatch between CalendarFromStr
and CalendarBase
, I get Expected a dot import path string: CalendarFromStr
.
Therefore, these two cases indicate that when there is something wrong, it always believes that there is something missing.
Thank you for reporting! This has been fixed with pull request #458.
🐛 Bug report
From issue 309
When the classmethod's parameters do not include their type, the error message indicates the failure to find the method instead of prompting the lack of types.
Error message:
To reproduce
Config file
-->
Expected behavior
Indicate the missing of the type of firstweekday.
Environment
pip install jsonargparse[all]