from typing import TextIO


def func():
    var: [TextIO]
    with open('file.txt') as var:
        var

from typing import TextIO


def func():
    var: [TextIO]
    with open('file.txt') as var:
        var
