Skip to content

Commit fcec91d

Browse files
committed
enhance: Update mergify check more generally
- fix: Remove not useful SequenceIterator See also: #2612 Signed-off-by: yangxuan <[email protected]>
1 parent 40d8157 commit fcec91d

File tree

3 files changed

+10
-29
lines changed

3 files changed

+10
-29
lines changed

.github/mergify.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ pull_request_rules:
44
- or:
55
- base=master
66
- base~=2\.\d
7-
- "status-success=Run Python Tests (3.8, windows-2022)"
8-
- "status-success=Run Python Tests (3.13, windows-2022)"
9-
- "status-success=Run Python Tests (3.8, ubuntu-22.04)"
10-
- "status-success=Run Python Tests (3.13, ubuntu-22.04)"
11-
- "status-success=Run Check Proto (3.8)"
12-
- "status-success=Code lint check (3.8)"
13-
- "status-success=Run Check Proto (3.13)"
14-
- "status-success=Code lint check (3.13)"
7+
# Require that Python tests succeed on Windows (any Python version, any Windows build)
8+
- "status-success~=Run Python Tests \\(\\d+\\.\\d+, windows-\\S+\\)"
9+
# Require that Python tests succeed on Ubuntu (any Python version, any Ubuntu build)
10+
- "status-success~=Run Python Tests \\(\\d+\\.\\d+, ubuntu-\\S+\\)"
11+
# Require that proto checks pass for any Python version
12+
- "status-success~=Run Check Proto \\(\\d+\\.\\d+\\)"
13+
# Require that code lint checks pass for any Python version
14+
- "status-success~=Code lint check \\(\\d+\\.\\d+\\)"
1515
actions:
1616
label:
1717
add:

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Run Python Tests
1111
strategy:
1212
matrix:
13-
python-version: [3.8, 3.12]
13+
python-version: [3.8, 3.13]
1414
os: [ubuntu-22.04, windows-2022]
1515
runs-on: ${{ matrix.os }}
1616

pymilvus/client/abstract.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import abc
2-
from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
2+
from typing import Any, Dict, List, Optional, Tuple, Union
33

44
import ujson
55

@@ -351,19 +351,6 @@ def _pack(self, raw: Any):
351351
)
352352

353353

354-
class SequenceIterator:
355-
def __init__(self, seq: Sequence[Any]):
356-
self._seq = seq
357-
self._idx = 0
358-
359-
def __next__(self) -> Any:
360-
if self._idx < len(self._seq):
361-
res = self._seq[self._idx]
362-
self._idx += 1
363-
return res
364-
raise StopIteration
365-
366-
367354
class BaseRanker:
368355
def __int__(self):
369356
return
@@ -660,9 +647,6 @@ def get_fields_by_range(
660647
continue
661648
return field2data
662649

663-
def __iter__(self) -> SequenceIterator:
664-
return SequenceIterator(self)
665-
666650
def __str__(self) -> str:
667651
"""Only print at most 10 query results"""
668652
reminder = f" ... and {len(self) - 10} results remaining" if len(self) > 10 else ""
@@ -743,9 +727,6 @@ def __init__(
743727

744728
super().__init__(hits)
745729

746-
def __iter__(self) -> SequenceIterator:
747-
return SequenceIterator(self)
748-
749730
def __str__(self) -> str:
750731
"""Only print at most 10 query results"""
751732
reminder = f" ... and {len(self) - 10} entities remaining" if len(self) > 10 else ""

0 commit comments

Comments
 (0)