KittyCAD/kittycad.py

File conversion - inconsistent return types

Closed this issue · 0 comments

Return types for create_file_conversion_with_base64_helper.sync() and .asyncio are generated as Optional[Union[Any, Tuple[FileConversion, bytes], Error]]

  1. We should remove Any type because it negates type checking
  2. Remove 'Optional` and return either a Success or Failure instead of None

The desired return type is Union[Tuple[FileConversion, bytes], Error]] or a hypothetical equivalent Union[FileConversionSuccess, Error]