Skip to content

FileStorage perhaps has incorrect typing metadata #2155

@hughsie

Description

@hughsie

Describe how to replicate the bug.

from flask import request
# snip some app-specific logic...
fileitem = request.files["file"]
blob = fileitem.read()

and then:

mypy test.py
test.py:3: error: "FileStorage" has no attribute "read"

Environment:

  • Python version: 3.9.5
  • Flask version: 2.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions