Replies: 1 comment
-
I didn't create issue for this, because I think this is intentional. But even if this is - I don't get the purpose |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I walked through
formparsers
code and found out. That all UploadFile instances are created with initial value of thesize
field set to0
. So, I think, annotation of the attribute should be set to justint
, notint | None
.Reference for the UploadFile.size parameter.
https://github.com/encode/starlette/blob/fa5355442753f794965ae1af0f87f9fec1b9a3de/starlette/datastructures.py#L422
Reference for the code that creates UploadFile instance in
formparsers
.https://github.com/encode/starlette/blob/fa5355442753f794965ae1af0f87f9fec1b9a3de/starlette/formparsers.py#L211-L216
Beta Was this translation helpful? Give feedback.
All reactions