-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Milestone
Description
blob_type exists as a shorthand to create subclasses of Blob with the media type pre-filled. However, it doesn't play nicely with type checking/annotations, because types should not be the result of function calls.
I propose we remove blob_type and instead explain that Blob subclasses should be made by subclassing, e.g.
class PNGBlob(Blob):
media_type: str = "image/png"This is two lines rather than one, but it works properly with all the tools I've tried (mostly VSCode and mypy).
Metadata
Metadata
Assignees
Labels
No labels