Commit a0f09e23 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

testsuite: Simplify Python <3.5 fallback for TextIO

(cherry picked from commit d092d859)
parent 012f13b5
......@@ -24,8 +24,11 @@ except:
# is taken. We exploit this below.
# TextIO is missing on some older Pythons.
if 'TextIO' in globals():
TextIO = typing.TextIO
if 'TextIO' not in globals():
TextIO = typing.TextIO
except ImportError:
TextIO = None # type: ignore
TextIO = None # type: ignore
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment