(
self,
allowed_formats: Optional[List[InputFormat]] = None,
format_options: Optional[Dict[InputFormat, FormatOption]] = None,
)
| 157 | _default_download_filename = "file" |
| 158 | |
| 159 | def __init__( |
| 160 | self, |
| 161 | allowed_formats: Optional[List[InputFormat]] = None, |
| 162 | format_options: Optional[Dict[InputFormat, FormatOption]] = None, |
| 163 | ): |
| 164 | self.allowed_formats = ( |
| 165 | allowed_formats if allowed_formats is not None else [e for e in InputFormat] |
| 166 | ) |
| 167 | self.format_to_options = { |
| 168 | format: ( |
| 169 | _get_default_option(format=format) |
| 170 | if (custom_option := (format_options or {}).get(format)) is None |
| 171 | else custom_option |
| 172 | ) |
| 173 | for format in self.allowed_formats |
| 174 | } |
| 175 | self.initialized_pipelines: Dict[Type[BasePipeline], BasePipeline] = {} |
| 176 | |
| 177 | def initialize_pipeline(self, format: InputFormat): |
| 178 | """Initialize the conversion pipeline for the selected format.""" |
nothing calls this directly
no test coverage detected