Is there any correct type hint to use for a file or file-like object in Python? For example, how would I type-hint the return value of this function?

def foo() -> ???:
    return open('bar')

2 Answers
2

Leave a Reply

Your email address will not be published. Required fields are marked *