def __init__(self, parser_function: Union[ParsingMethodForStream, ParsingMethodForFile],<EOL>supported_types: Set[Type[T]], supported_exts: Set[str], streaming_mode: bool = True,<EOL>custom_name: str = None, function_args: dict = None, option_hints: Callable[[], str] = None):
super(SingleFileParserFunction, self).__init__(supported_types=supported_types, supported_exts=supported_exts)<EOL>check_var(custom_name, var_types=str, var_name='<STR_LIT>', enforce_not_none=False)<EOL>self._custom_name = custom_name<EOL>check_var(parser_function, var_types=Callable, var_name='<STR_LIT>')<EOL>self._parser_func = parser_function<EOL>check_var(streaming_mode, var_types=bool, var_name='<STR_LIT>')<EOL>self._streaming_mode = streaming_mode<EOL>check_var(function_args, var_types=dict, var_name='<STR_LIT>', enforce_not_none=False)<EOL>self.function_args = function_args<EOL>check_var(option_hints, var_types=Callable, var_name='<STR_LIT>', enforce_not_none=False)<EOL>self._option_hints_func = option_hints<EOL>
Constructor from a parser function , a mandatory set of supported types, and a mandatory set of supported
extensions.

Two kind of parser_function may be provided as implementations:
* if streaming_mode=True (default), this class handles opening and closing the file, and parser_function should
have a signature such as my_func(desired_type: Type[T], opened_file: TextIOBase, **kwargs) -> T
* if streaming_mode=False, this class does not handle opening and closing the file. parser_function should be a
my_func(desired_type: Type[T], file_path: str, encoding: str, **kwargs) -> T

:param parser_function:
:param streaming_mode: an optional boolean (default True) indicating if the function should be called with an
open stream or with a file path
:param supported_types: mandatory set of supported types, or {
:param supported_exts: mandatory set of supported singlefile extensions ('.txt', '.json' ...)
:param function_args: kwargs that will be passed to the function at every call
:param option_hints: an optional method returning a string containing the options descriptions