Skip to content

Commit 9a698a5

Browse files
committed
fix: type hints like list[str] not support in python38
1 parent fef5290 commit 9a698a5

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

merkly/mtree.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ def up_layer(self, leaves: List[bytes]) -> List[bytes]:
167167
return new_layer
168168

169169
@property
170-
def human_leaves(self) -> list[str]:
170+
def human_leaves(self) -> List[str]:
171171
return [leaf.hex() for leaf in self.leaves]
172172

173173
@property
174-
def human_short_leaves(self) -> list[str]:
174+
def human_short_leaves(self) -> List[str]:
175175
return [leaf.hex() for leaf in self.short_leaves]

merkly/utils.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ def keccak(data: bytes) -> bytes:
5252

5353
def half(list_item: List[int]) -> Tuple[int, int]:
5454
"""
55-
# Slice a `x: list[int]` in a pairs
56-
- params `x: list[int]`
57-
- return `list: list[list[int]]
55+
# Slice a `x: List[int]` in a pairs
56+
- params `x: List[int]`
57+
- return `list: List[List[int]]
5858
5959
```python
6060
>>> slicer([1,2,3,4])
@@ -72,9 +72,9 @@ def half(list_item: List[int]) -> Tuple[int, int]:
7272

7373
def slice_in_pairs(list_item: list):
7474
"""
75-
# Slice a `x: list[int]` in pairs, pairs is sublist of 2 items
76-
- params `x: list[int]`
77-
- return `list: list[list[int]]
75+
# Slice a `x: List[int]` in pairs, pairs is sublist of 2 items
76+
- params `x: List[int]`
77+
- return `list: List[List[int]]
7878
7979
```python
8080
>>> slicer([1,2,3,4])

0 commit comments

Comments
 (0)