Skip to content

Commit aa70e42

Browse files
committed
renew project
1 parent 9d5f9ac commit aa70e42

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ explain:
8989
- sortingx-1.1.0 is the first version aligned with the `list.sort()` usage method.
9090
- sortingx-1.1.1 is the first stable version accelerated with typing_extensions.
9191
- sortingx-1.1.2 is the first stable version that has a return value and extends the iterable data types.
92+
- sortingx-1.1.3 is the stable version that complete the typing of local variables and align with `sorted()` usage method.
9293

9394
## LICENSE
9495

Diff for: sortingx/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
from .sorting import bubble, insert, shell, heap, quick, merge
1818

19-
__version__ = '1.1.2'
19+
__version__ = '1.1.3'
2020

2121
assert sys.version_info >= (3, 7, 0)

Diff for: sortingx/sorting.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ def insert(__iterable: Iterable[_T], key: Optional[Callable[[_T], SupportsRichCo
5151
while low <= high: # sequence conforming to monotonicity
5252
mid: int = (low + high) // 2
5353
if core(keyc, compare[mid], key, reverse):
54-
low = mid + 1
54+
low: int = mid + 1
5555
else:
56-
high = mid - 1
56+
high: int = mid - 1
5757
for pre in range(index, low, -1): # from back to front
5858
__iterable[pre] = __iterable[pre - 1]
5959
if key != None:

Diff for: test_typing.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sortingx as six
22

3-
data = {'Alex': 100, 'Jack': 97, 'Peter': 88, 'Li': 98}
4-
print(type(data))
5-
test = sorted(data, reverse=True)
6-
output = six.merge(data, reverse=True)
7-
print(output, '\n', output == test)
3+
data = {('Alex', 100, 90, 98, 95), ('Jack', 97, 88, 98, 92), ('Peter', 92, 95, 92, 96), ('Li', 97, 89, 98, 92)}
4+
test = six.bubble(data, key=lambda x: (x[0], x[1]), reverse=True)
5+
output = sorted(data, key=lambda x: (x[0], x[1]), reverse=True)
6+
print(test, '\n', output)

0 commit comments

Comments
 (0)