def METHOD_NAME(self):
    try:
        file_handle = open("foo", encoding="utf8")  # must not trigger
    except FileNotFoundError:
        file_handle = open("bar", encoding="utf8")  # must not trigger
    with file_handle:
        return file_handle.read()