Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

type annotation of PILBase.create #42

Closed
jaidmin opened this issue Jan 9, 2020 · 2 comments
Closed

type annotation of PILBase.create #42

jaidmin opened this issue Jan 9, 2020 · 2 comments

Comments

@jaidmin
Copy link
Contributor

jaidmin commented Jan 9, 2020

The PILBase.create method already can handle tensors, ndarrays and bytes in addition to a filename as input, but the type annotation only allows Path and str, so the typedispatch ignores everything else and returns the input.
Is there a reason for this?
I changed it locally and it worked just fine, am happy to create a PR to change this.

@sgugger
Copy link
Contributor

sgugger commented Jan 10, 2020

Ah that's a mistake on my side. Please do suggest a PR to fix this!

@sgugger
Copy link
Contributor

sgugger commented Jan 11, 2020

Closed by #43

@sgugger sgugger closed this as completed Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants