summaryrefslogtreecommitdiff
path: root/typing_stubs.py
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-06-19 13:25:07 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-06-25 08:37:46 -0400
commitc346585b5f5054a85e48dc546e198c5be124340f (patch)
tree7a3d30e456c2811baf64010f059cb8ff6c7dac84 /typing_stubs.py
parentebd63e8de30470ccf8b65c11f0fc82705960b5cf (diff)
downloadhaskell-c346585b5f5054a85e48dc546e198c5be124340f.tar.gz
testsuite: A major revamp of the driver
This tries to put the testsuite driver into a slightly more maintainable condition: * Add type annotations where easily done * Use pathlib.Path instead of str paths * Make it pass the mypy typechecker
Diffstat (limited to 'typing_stubs.py')
-rw-r--r--typing_stubs.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/typing_stubs.py b/typing_stubs.py
new file mode 100644
index 0000000000..b2e3948043
--- /dev/null
+++ b/typing_stubs.py
@@ -0,0 +1,13 @@
+# Stub definitions for things provided by the typing package
+# for use by older Python versions.
+
+class Dummy:
+ def __index__(self, *args):
+ return None
+
+List = Dummy()
+Tuple = Dummy()
+Set = Dummy()
+TextIO = Dummy()
+Iterator = Dummy()
+Newtype = lambda name, ty: ty