karolyartur commited on
Commit
ced6b1f
1 Parent(s): b998535

Fix python version issues with typing

Browse files
Files changed (1) hide show
  1. oe_dataset.py +8 -2
oe_dataset.py CHANGED
@@ -16,8 +16,14 @@
16
  #
17
  """OE dataset"""
18
 
19
- from collections.abc import Sequence
20
- from typing import Optional, Generator, Tuple, IO
 
 
 
 
 
 
21
 
22
  import datasets
23
 
 
16
  #
17
  """OE dataset"""
18
 
19
+ import sys
20
+ if sys.version_info < (3, 9):
21
+ from typing import Sequence, Generator, Tuple
22
+ else:
23
+ from collections.abc import Sequence, Generator
24
+ Tuple = tuple
25
+
26
+ from typing import Optional, IO
27
 
28
  import datasets
29