diff --git a/src/caosadvancedtools/table_json_conversion/convert.py b/src/caosadvancedtools/table_json_conversion/convert.py index aabdf827615c240c248e7b52d23b83594688443b..1c84d0e2d01d22d7469d84e8f5c1fd18fd1d063b 100644 --- a/src/caosadvancedtools/table_json_conversion/convert.py +++ b/src/caosadvancedtools/table_json_conversion/convert.py @@ -707,10 +707,8 @@ def _set_in_nested(mydict: dict, path: list, value: Any, prefix: list = [], skip return mydict -# ToDo: Fix https://gitlab.indiscale.com/caosdb/src/caosdb-advanced-user-tools/-/issues/138 -# and remove pylint disable def to_dict(xlsx: Union[str, BinaryIO], schema: Union[dict, str, TextIO], - validate: bool = None, strict: bool = False) -> dict: # pylint: disable=unused-argument + validate: bool = False, strict: bool = False) -> dict: """Convert the xlsx contents to a dict, it must follow a schema. Parameters @@ -722,10 +720,10 @@ def to_dict(xlsx: Union[str, BinaryIO], schema: Union[dict, str, TextIO], Schema for validation of XLSX content. validate: bool, optional - If True, validate the result against the schema. + If True, validate the result against the schema. Default is False. strict: bool, optional - If True, fail faster. + If True, fail faster. Default is False. Returns @@ -734,4 +732,4 @@ def to_dict(xlsx: Union[str, BinaryIO], schema: Union[dict, str, TextIO], A dict representing the JSON with the extracted data. """ converter = XLSXConverter(xlsx, schema, strict=strict) - return converter.to_dict() + return converter.to_dict(validate=validate)