Skip to content
Snippets Groups Projects
Commit d092d859 authored by Ben Gamari's avatar Ben Gamari
Browse files

testsuite: Simplify Python <3.5 fallback for TextIO

parent 100cc756
No related branches found
Tags ghc-8.10.1-alpha1
No related merge requests found
...@@ -24,8 +24,11 @@ except: ...@@ -24,8 +24,11 @@ except:
# is taken. We exploit this below. # is taken. We exploit this below.
# TextIO is missing on some older Pythons. # TextIO is missing on some older Pythons.
if 'TextIO' in globals(): if 'TextIO' not in globals():
TextIO = typing.TextIO try:
TextIO = typing.TextIO
except ImportError:
TextIO = None # type: ignore
else: else:
TextIO = None # type: ignore TextIO = None # type: ignore
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment