Skip to content

Commit 334de90

Browse files
committed
fix
1 parent 228d76b commit 334de90

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

linq/core/flow.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
from collections import defaultdict
22
from functools import partial, update_wrapper
33

4-
from typing import Generic, TypeVar
4+
try:
5+
from typing import Generic, TypeVar
6+
except:
7+
class GenericMeta(type):
8+
def __getitem__(self, item):
9+
return object
10+
11+
12+
class Generic(metaclass=GenericMeta):
13+
pass
14+
15+
16+
class TypeVar:
17+
def __new__(cls, *args, **kwargs):
18+
return args
519

620
T = TypeVar('T')
721

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def test_Any():
188188

189189

190190
def test_Next():
191-
Flow((i for i in range(3))).Next()
191+
Flow((i for i in range(3))).first()
192192

193193

194194
test_Next()

0 commit comments

Comments
 (0)